#NEWLINE# def encode( value , unpicklable = True , make_refs = True , keys = False , max_depth = None , backend = None , warn = False , max_iter = None , numeric_keys = False ) : #NEWLINE# #INDENT# 'Return a JSON formatted representation of value, a Python object.\n\n    :param unpicklable: If set to False then the output will not contain the\n        information necessary to turn the JSON data back into Python objects,\n        but a simpler JSON stream is produced.\n    :param max_depth: If set to a non-negative integer then jsonpickle will\n        not recurse deeper than \'max_depth\' steps into the object.  Anything\n        deeper than \'max_depth\' is represented using a Python repr() of the\n        object.\n    :param make_refs: If set to False jsonpickle\'s referencing support is\n        disabled.  Objects that are id()-identical won\'t be preserved across\n        encode()/decode(), but the resulting JSON stream will be conceptually\n        simpler.  jsonpickle detects cyclical objects and will break the cycle\n        by calling repr() instead of recursing when make_refs is set False.\n    :param keys: If set to True then jsonpickle will encode non-string\n        dictionary keys instead of coercing them into strings via `repr()`.\n    :param warn: If set to True then jsonpickle will warn when it\n        returns None for an object which it cannot pickle\n        (e.g. file descriptors).\n    :param max_iter: If set to a non-negative integer then jsonpickle will\n        consume at most `max_iter` items when pickling iterators.\n\n    >>> encode(\'my string\')\n    \'"my string"\'\n    >>> encode(36)\n    \'36\'\n\n    >>> encode({\'foo\': True})\n    \'{"foo": true}\'\n\n    >>> encode({\'foo\': True}, max_depth=0)\n    \'"{\\\'foo\\\': True}"\'\n\n    >>> encode({\'foo\': True}, max_depth=1)\n    \'{"foo": "True"}\'\n\n\n    ' #NEWLINE# if ( backend is None ) : #NEWLINE# #INDENT# backend = json #NEWLINE# #UNINDENT# return pickler . encode ( value , backend = backend , unpicklable = unpicklable , make_refs = make_refs , keys = keys , max_depth = max_depth , warn = warn , max_iter = max_iter , numeric_keys = numeric_keys )