json: improvements to rendering and processing