original_docstring: 
      Print the output data in JSON
      
docstring: Print the output data in JSON
docstring_tokens: Print the output data in JSON
code: def output(data, **kwargs):  # pylint: disable=unused-argument
      """
      Print the output data in JSON
      """
      try:
          dump_opts = {"indent": 4, "default": repr}
  
          if "output_indent" in __opts__:
  
              indent = __opts__.get("output_indent")
              sort_keys = False
  
              if indent == "pretty":
                  indent = 4
                  sort_keys = True
  
              elif isinstance(indent, int):
                  if indent < 0:
                      indent = None
  
              dump_opts["indent"] = indent
              dump_opts["sort_keys"] = sort_keys
  
          return dson.dumps(data, **dump_opts)
  
      except UnicodeDecodeError as exc:
          log.error("Unable to serialize output to dson")
          return dson.dumps(
              {"error": "Unable to serialize output to DSON", "message": str(exc)}
          )
  
      except TypeError:
          log.debug("An error occurred while outputting DSON", exc_info=True)
      # Return valid JSON for unserializable objects
      return dson.dumps({})
code_tokens: def output ( data , ** kwargs ) : try : dump_opts = { "indent" : 4 , "default" : repr } if "output_indent" in __opts__ : indent = __opts__ . get ( "output_indent" ) sort_keys = False if indent == "pretty" : indent = 4 sort_keys = True elif isinstance ( indent , int ) : if indent < 0 : indent = None dump_opts [ "indent" ] = indent dump_opts [ "sort_keys" ] = sort_keys return dson . dumps ( data , ** dump_opts ) except UnicodeDecodeError as exc : log . error ( "Unable to serialize output to dson" ) return dson . dumps ( { "error" : "Unable to serialize output to DSON" , "message" : str ( exc ) } ) except TypeError : log . debug ( "An error occurred while outputting DSON" , exc_info = True ) return dson . dumps ( { } )
short_docstring: Print the output data in JSON
short_docstring_tokens: Print the output data in JSON
comment: # pylint: disable=unused-argument$SEP$"""
      Print the output data in JSON
      """$SEP$# Return valid JSON for unserializable objects