Fixed up JSON escaping and other JSON formatting.