how to map the JSON to a complex object, for example, an Employee object has a Company field , how to serialize and deserialize json to form field ?

Thanks

Code:
{id:'1234', name:'john', company:{name:'ABC', type:'Retail'}}

<form>
<input name="id" type="input" /> 
<input name="name" type="input" /> 
<input name="company.id" type="input" />
<input name="company.type" type="input" />
</form>