jsonmodels is library to make it easier for you to deal with structures that are converted to, or read from JSON.

jazzband jazzband Last update: Mar 31, 2024

JSON models

Jazzband

image

Tests

PyPI

Coverage

jsonmodels is library to make it easier for you to deal with structures that are converted to, or read from JSON.

Features

(Note that only_odd_numbers did not modify schema, since only class based validators are able to do that, though it will still work as expected in python. Use class based validators that can be expressed in json schema if you want to be 100% correct on schema side.)

(Plese note that using schemaless fields can cause your models to get out of control - especially if you are the one responsible for data schema. On the other hand there is usually the case when incomming data are with no schema defined and schemaless fields are the way to go.)

DictField allow to pass any dict of values ("type": "object"), but note, that it will not make any validation on values except for the dict type.

More

For more examples and better description see full documentation: http://jsonmodels.rtfd.org.

Subscribe to our newsletter