def export_json_object(dict_obj, filename=None):
try:<EOL><INDENT>if filename:<EOL><INDENT>try:<EOL><INDENT>with open(filename, '<STR_LIT:w>') as handle:<EOL><INDENT>handle.write(json.dumps(dict_obj, indent=<NUM_LIT:4>, sort_keys=True))<EOL>logger.info(<EOL>'<STR_LIT>' %<EOL>(inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>], filename))<EOL><DEDENT>handle.close()<EOL><DEDENT>except TypeError as e:<EOL><INDENT>logger.warning(<EOL>'<STR_LIT>' %<EOL>(inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>], str(e)))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>json_str = json.dumps(dict_obj, indent=<NUM_LIT:4>, sort_keys=True)<EOL>print(highlight(json_str, lexers.JsonLexer(), formatters.TerminalFormatter()))<EOL>logger.info('<STR_LIT>' % inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>])<EOL>return True<EOL><DEDENT><DEDENT>except IOError as e:<EOL><INDENT>logger.critical(<EOL>'<STR_LIT>' %<EOL>(inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>], filename, str(e)))<EOL>return False<EOL><DEDENT>else:<EOL><INDENT>logger.info('<STR_LIT>' % filename)<EOL>return True<EOL><DEDENT>
Summary:
    exports object to block filesystem object

Args:
    :dict_obj (dict): dictionary object
    :filename (str):  name of file to be exported (optional)

Returns:
    True | False Boolean export status