Added support for nested model data and jsonSerialize()