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.11-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0cdb6b17f1b857bd1e0d0120052e9bdc5adbcc9ee3333513410137c1c3b59aa |
|
MD5 | cba69030fc0be913b8366220b0acd9fa |
|
BLAKE2b-256 | 2e14c919c553a6d956c6ebf0e6438bac65238e0f400b3c0a02eb6329b12226cb |