Add code to generate object to json conversion.