<s> r"""<STR_LIT>""" <EOL> __version__ = '<STR_LIT>' <EOL> __all__ = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> ] <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import warnings <EOL> warnings . warn ( '<STR_LIT>' , DeprecationWarning ) <EOL> from simplejson . decoder import JSONDecoder <EOL> from simplejson . encoder import JSONEncoder <EOL> else : <EOL> from decoder import JSONDecoder <EOL> from encoder import JSONEncoder <EOL> _default_encoder = JSONEncoder ( <EOL> skipkeys = False , <EOL> ensure_ascii = True , <EOL> check_circular = True , <EOL> allow_nan = True , <EOL> indent = None , <EOL> separators = None , <EOL> encoding = '<STR_LIT:utf-8>' , <EOL> default = None , <EOL> ) <EOL> def dump ( obj , fp , skipkeys = False , ensure_ascii = True , check_circular = True , <EOL> allow_nan = True , cls = None , indent = None , separators = None , <EOL> encoding = '<STR_LIT:utf-8>' , default = None , ** kw ) : <EOL> """<STR_LIT>""" <EOL> if ( skipkeys is False and ensure_ascii is True and <EOL> check_circular is True and allow_nan is True and <EOL> cls is None and indent is None and separators is None and <EOL> encoding == '<STR_LIT:utf-8>' and default is None and not kw ) : <EOL> iterable = _default_encoder . iterencode ( obj ) <EOL> else : <EOL> if cls is None : <EOL> cls = JSONEncoder <EOL> iterable = cls ( skipkeys = skipkeys , ensure_ascii = ensure_ascii , <EOL> check_circular = check_circular , allow_nan = allow_nan , indent = indent , <EOL> separators = separators , encoding = encoding , <EOL> default = default , ** kw ) . iterencode ( obj ) <EOL> for chunk in iterable : <EOL> fp . write ( chunk ) <EOL> def dumps ( obj , skipkeys = False , ensure_ascii = True , check_circular = True , <EOL> allow_nan = True , cls = None , indent = None , separators = None , <EOL> encoding = '<STR_LIT:utf-8>' , default = None , ** kw ) : <EOL> """<STR_LIT>""" <EOL> if ( skipkeys is False and ensure_ascii is True and <EOL> check_circular is True and allow_nan is True and <EOL> cls is None and indent is None and separators is None and <EOL> encoding == '<STR_LIT:utf-8>' and default is None and not kw ) : <EOL> return _default_encoder . encode ( obj ) <EOL> if cls is None : <EOL> cls = JSONEncoder <EOL> return cls ( <EOL> skipkeys = skipkeys , ensure_ascii = ensure_ascii , <EOL> check_circular = check_circular , allow_nan = allow_nan , indent = indent , <EOL> separators = separators , encoding = encoding , default = default , <EOL> ** kw ) . encode ( obj ) <EOL> _default_decoder = JSONDecoder ( encoding = None , object_hook = None ) <EOL> def load ( fp , encoding = None , cls = None , object_hook = None , parse_float = None , <EOL> parse_int = None , parse_constant = None , ** kw ) : <EOL> """<STR_LIT>""" <EOL> return loads ( fp . read ( ) , <EOL> encoding = encoding , cls = cls , object_hook = object_hook , <EOL> parse_float = parse_float , parse_int = parse_int , <EOL> parse_constant = parse_constant , ** kw ) <EOL> def loads ( s , encoding = None , cls = None , object_hook = None , parse_float = None , <EOL> parse_int = None , parse_constant = None , ** kw ) : <EOL> """<STR_LIT>""" <EOL> if ( cls is None and encoding is None and object_hook is None and <EOL> parse_int is None and parse_float is None and <EOL> parse_constant is None and not kw ) : <EOL> return _default_decoder . decode ( s ) <EOL> if cls is None : <EOL> cls = JSONDecoder <EOL> if object_hook is not None : <EOL> kw [ '<STR_LIT>' ] = object_hook <EOL> if parse_float is not None : <EOL> kw [ '<STR_LIT>' ] = parse_float <EOL> if parse_int is not None : <EOL> kw [ '<STR_LIT>' ] = parse_int <EOL> if parse_constant is not None : <EOL> kw [ '<STR_LIT>' ] = parse_constant <EOL> return cls ( encoding = encoding , ** kw ) . decode ( s ) <EOL> def decode ( s ) : <EOL> """<STR_LIT>""" <EOL> import warnings <EOL> warnings . warn ( "<STR_LIT>" , <EOL> DeprecationWarning ) <EOL> return loads ( s ) <EOL> def encode ( obj ) : <EOL> """<STR_LIT>""" <EOL> import warnings <EOL> warnings . warn ( "<STR_LIT>" , <EOL> DeprecationWarning ) <EOL> return dumps ( obj ) <EOL> def read ( s ) : <EOL> """<STR_LIT>""" <EOL> import warnings <EOL> warnings . warn ( "<STR_LIT>" , <EOL> DeprecationWarning ) <EOL> return loads ( s ) <EOL> def write ( obj ) : <EOL> """<STR_LIT>""" <EOL> import warnings <EOL> warnings . warn ( "<STR_LIT>" , <EOL> DeprecationWarning ) <EOL> return dumps ( obj ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import simplejson . tool <EOL> simplejson . tool . main ( ) </s>
