jazzband / jsonmodels

jsonmodels is library to make it easier for you to deal with structures that are converted to, or read from JSON.
http://jsonmodels.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
334 stars 51 forks source link

Fix issue#72 #74

Closed johncalls closed 7 years ago

johncalls commented 7 years ago

(For a more detailed description of the underlying problem see issue #72.)

In order to properly cast jsonmodels' objects into python structs and, furthermore, valid json strings, to_struct in parser.py has been modified. It now distinguishes between a ListField, an EmbeddedField and basic field types.

Furthermore, additional tests have been added to test_struct.py. Please note, that none of these tests will pass without the modifications done in parser.py.

beregond commented 7 years ago

Ok, thanks! Seems like I should find more generic way for it, but for now it's ok, especially if this works :)