Package django :: Package utils :: Package simplejson :: Module encoder
[hide private]
[frames] | no frames]

Module encoder

source code

Implementation of JSONEncoder

Classes [hide private]
  JSONEncoder
Extensible JSON <http://json.org> encoder for Python data structures.
Functions [hide private]
 
FLOAT_REPR(object)
Return the canonical string representation of the object.
 
floatstr(o, allow_nan=True) source code
 
encode_basestring(s)
Return a JSON representation of a Python string
source code
 
py_encode_basestring_ascii(s) source code
 
encode_basestring_ascii(s) source code
Variables [hide private]
  ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
  ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
  HAS_UTF8 = re.compile(r'[\x80-\xff]')
  ESCAPE_DCT = {'\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\...
  INFINITY = float('1e66666')

Imports: re, _speedups.encode_basestring_ascii


Function Details [hide private]

FLOAT_REPR(object)

 

Return the canonical string representation of the object. For most object types, eval(repr(object)) == object.

Returns:
string


Variables Details [hide private]

ESCAPE_DCT

Value:
{'\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', '\n': '\\n', '\r'\
: '\\r', '\t': '\\t',}