wickman / pystachio

type-checked dictionary templating library for python
MIT License
91 stars 22 forks source link

Loading JSON in non-strict mode does not filter unrecognized fields from children #16

Closed jcohen closed 9 years ago

jcohen commented 9 years ago

When you call json_load[1] with strict=False, it does not recursively filter unrecognized fields[2]. This eventually causes parsing to fail when a child element has an unexpected property[3].

[1] https://github.com/wickman/pystachio/blob/99bad08d6c7f3fa7074e173b58e4a336e81847fc/pystachio/composite.py#L284 [2] https://github.com/wickman/pystachio/blob/99bad08d6c7f3fa7074e173b58e4a336e81847fc/pystachio/composite.py#L274-L277 [3] https://github.com/wickman/pystachio/blob/99bad08d6c7f3fa7074e173b58e4a336e81847fc/pystachio/composite.py#L168-L169

brian-brazil commented 9 years ago

See #15

jcohen commented 9 years ago

Ahh, whoops! Missed that when I filed.

wickman commented 9 years ago

Closed as duplicate to #15