modified to render JSON in compact format.