def dump2json(self, obj, filepath, override=False, **kwargs):
<EOL>if isinstance(obj, dict):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise _NotADictionary(<EOL>"<STR_LIT>")<EOL><DEDENT>if str(filepath[-<NUM_LIT:4>:]) == '<STR_LIT>':<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>filepath = "<STR_LIT:.>".join((str(filepath), "<STR_LIT>"))<EOL><DEDENT>if override is False:<EOL><INDENT>if os.path.isfile(filepath):<EOL><INDENT>raise _FileAlreadyExists(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(filepath))<EOL><DEDENT><DEDENT>with open(filepath, '<STR_LIT>') as json_file:<EOL><INDENT>json.dump(obj, json_file, **kwargs)<EOL><DEDENT>
Dump a dictionary into a JSON dictionary.

Uses the json.dump() function.

Parameters
----------
obj : :class:`dict`
    A dictionary to be dumpped as JSON file.

filepath : :class:`str`
   The filepath for the dumped file.

override : :class:`bool`
   If True, any file in the filepath will be override. (default=False)