Deserialize JSON into Python objects and reverse.
Project description
Note: This package is in the dangerous land of
0.x.y
versions and may be subject to breaking changes with minor version increments.
This package is superseded by databind.core.
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(str, default=None)
mapper = ObjectMapper(JsonModule())
print(mapper.deserialize({'name': 'John Wick', 'age': 48, 'address': 'Wicked St.'})) # Person(name='John Wick')
Copyright © 2020 Niklas Rosenstein
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.14-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3765fd581c2ca2ee249ccfd460be0f472cc2bc9e5305e2f415d587a5e27c3b86 |
|
MD5 | 059c19a29c26644c0f94ff7d3a82c088 |
|
BLAKE2b-256 | 2ac7880f19ad45cce43f7667fa75b338e9e8e8ff2f10a3d90426b7f505970802 |