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
Built Distribution
Close
Hashes for nr.databind.json-0.0.10-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c1205e458d0eb8b2b62d1fb644764e3684e9c3076c8e19f0da4fa08a22ae92e |
|
MD5 | a9294f1472e3180e6f4b65913ad3c761 |
|
BLAKE2b-256 | 0e9daf989688d27bbe1f248cca994edc2dabc7b6d75921d5cf6c987917be7ec1 |