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 details)
File details
Details for the file fast-json-0.3.2.tar.gz
.
File metadata
- Download URL: fast-json-0.3.2.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/33.1.1 requests-toolbelt/0.8.0 tqdm/4.20.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1e706410cdc1b7bcab14383cdab9e093d7ca872ff761927c162bd7fda83ad2f |
|
MD5 | b6e8ace6e1e64d8a21273505b0e015f4 |
|
BLAKE2b-256 | 0f1eeafcfca27a76a767457623b095ca508f3e5a035c9a2649ad57f3f1dafa04 |