Correctly format to valid JSON