Fast JSON serialization and deserialization with ujson
Project description
Fast JSON serialization and deserialization with ujson.
import fast_json
print(
fast_json.dumps({
"foo": "bar",
"now": datetime.datetime.now()
})
)
Serializing custom type
import fast_json
from collections import namedtuple
MyType = namedtuple("MyType", ["name", "value"])
@fast_json.convert.register(MyType)
def _(value):
return "name={0.name} value={0.value}".format(value)
print(
fast_json.dumps({
"one": MyType(name="foo", value="bar")
})
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fast-json-0.1.0.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for fast_json-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63103dc467e729ae6240ef503853565958b1648d1edc214169d51d162f9cc413 |
|
MD5 | fe9c3624aeb7d47d3cb21e1a76afc8c4 |
|
BLAKE2b-256 | e66594bfdf9c15b54a498b6255fc0d2204e7ac57e86b490e8fc2e084d07b5277 |