improved JSON rendering