templating the json and builder in single class.