Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1696)

Unified Diff: base/json_writer.cc

Issue 147220: Use platform-appropriate newlines in JSON output (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/json_reader_unittest.cc ('k') | base/json_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json_writer.cc
===================================================================
--- base/json_writer.cc (revision 19366)
+++ base/json_writer.cc (working copy)
@@ -9,7 +9,11 @@
#include "base/values.h"
#include "base/string_escape.h"
-const char kPrettyPrintLineEnding[] = "\r\n";
+#if defined(OS_WIN)
+static const char kPrettyPrintLineEnding[] = "\r\n";
+#else
+static const char kPrettyPrintLineEnding[] = "\n";
+#endif
/* static */
void JSONWriter::Write(const Value* const node,
« no previous file with comments | « base/json_reader_unittest.cc ('k') | base/json_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698