Combines best parts of json and ujson for fast serialization
Project description
Combines best parts of json and ujson for fast serialization.
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.3.2.tar.gz
(1.9 kB
view hashes)