This is a wrapper for the json module: it will use simplejson if available, or the json module from Python >= 2.6 if available, and as a last resource the django.utils.simplejson module on App Engine.
It will also escape forward slashes and, by default, output the serialized JSON in a compact format, eliminating white spaces.
Some convenience functions are also available to encode and decode to and from base64 and to quote or unquote the values.
Serializes a value to JSON.
This comes from Tornado.
Parameters: |
|
---|---|
Returns: | The serialized value. |
Deserializes a value from JSON.
This comes from Tornado.
Parameters: |
|
---|---|
Returns: | The deserialized value. |
Serializes a value to JSON and encodes it using base64.
Parameters and return value are the same from encode().
Decodes a value using base64 and deserializes it from JSON.
Parameters and return value are the same from decode().