model and collection parsing from xml and json