from json to model in code gen