Implemented generation of json