json printing improvements