Using JSON and the js object model to represent entities