Deserialize JSON into Python objects and reverse.
Project description
nr.databind.json
The nr.databind.json
package implements (de-) serializers for nested payloads that usually
result from loading JSON-formatted data.
See also nr.databind.core.
Example
from nr.databind.core import Field, Struct, ObjectMapper
from nr.databind.json import JsonModule
class Person(Struct):
name = Field(str, prominent=True)
age = Field(int)
address = Field(int, default=None)
mapper = ObjectMapper(JsonModule())
print(mapper.deserialize({'name': 'John Wick', 'age': 48, 'address': 'Wicked St.'})) # Person(name='John Wick')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nr.databind.json-0.0.13.tar.gz
(11.2 kB
view details)
Built Distribution
File details
Details for the file nr.databind.json-0.0.13.tar.gz
.
File metadata
- Download URL: nr.databind.json-0.0.13.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 264c489a1c99228b47f290cd9523e44b348c63ef78515e2b9ca90b3deff5658b |
|
MD5 | 6bc652c3c1dccba8248a70991fa1bf6c |
|
BLAKE2b-256 | 5a795ba6200981836424e5a79a5738061cda6a9211e0c9f3bb68ec466a55a0c3 |
Provenance
File details
Details for the file nr.databind.json-0.0.13-py2.py3-none-any.whl
.
File metadata
- Download URL: nr.databind.json-0.0.13-py2.py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82af968a0eeb2c2ba2bc6f840c34b64eb4278035b9e3dfb9904e4e4ba519821d |
|
MD5 | 455124aeb4681d352f87f1bc98cd719d |
|
BLAKE2b-256 | a3a174f5036f97c8403a0c75149c74f8063e3963de02b81e754d73ae49310961 |