new abstraction for generating JSON from models