-
- Downloads
Add support for preprocessed JSON strings (with optimizations) in encoder
In some situations, you may have a large python dictionary you need to JSONify but one of the values inside the dict is already a JSON string. This is common when pulling an object from a database, for example, where one of the fields is a JSON blob/string. Previously you would have to deserialize and then reserialize that string just to serialize the high level object, but obviously this is unnecessarily slow. This changes adds a method/type that can be used to wrap a str and tell the serializer to just pass it through instead.
Showing
- simplejson/__init__.py 1 addition, 1 deletionsimplejson/__init__.py
- simplejson/_speedups.c 22 additions, 0 deletionssimplejson/_speedups.c
- simplejson/encoder.py 10 additions, 0 deletionssimplejson/encoder.py
- simplejson/tests/test_raw_json.py 30 additions, 0 deletionssimplejson/tests/test_raw_json.py
Loading
Please register or sign in to comment