Hi All,<div><br></div><div>Can anyone recommend a library for parsing/validating/serialising objects to and from JSON data structures? I&#39;m envisioning something a bit like an ORM, although obviously without the &#39;R&#39;...</div>

<div><br></div><div>The following is a bit inconsistent, but should illustrate the idea:</div><div><br></div><div>python:</div><div>class MyObject(JSONObject):</div><div>    name = StringField()</div><div>    roles = ListField(StringField(), min=0, max=10)</div>

<div>    pet = ObjectField({&#39;name&#39;: StringField(),</div><div>            &#39;type&#39;: PetTypeField()})</div><div><br></div><div>json:</div><div>{</div><div>    &#39;name&#39;: &#39;Mark Smith&#39;,</div><div>    &#39;roles&#39;: [&#39;user&#39;, &#39;developer&#39;],</div>

<div>    pet = {&#39;name&#39;: &#39;Fido&#39;, &#39;type&#39;: &#39;dog&#39;}</div><div>}</div><div><br></div><div>To be honest, the validation is more important than the mapping at this stage.</div><div><br></div><div>
--Mark</div>