JSON output, pretty printing, fixed xml