Index: base/json/json_writer.h |
diff --git a/base/json/json_writer.h b/base/json/json_writer.h |
index 94052c8034321dd28e6adf4699029e287eb93a6f..e4a143c77807e78bf84b4804b3bae988c86533bd 100644 |
--- a/base/json/json_writer.h |
+++ b/base/json/json_writer.h |
@@ -17,24 +17,19 @@ class Value; |
class BASE_EXPORT JSONWriter { |
public: |
enum Options { |
- // Do not escape the string, preserving its UTF8 characters. It is useful |
- // if you can pass the resulting string to the JSON parser in binary form |
- // (as UTF8). |
- OPTIONS_DO_NOT_ESCAPE = 1 << 0, |
- |
// For values of binary type, the value (and key if within a dictionary) |
// will be omitted from the output. |
- OPTIONS_OMIT_BINARY_VALUES = 1 << 1, |
+ OPTIONS_OMIT_BINARY_VALUES = 1 << 0, |
// This option instructs the writer to write doubles that have no fractional |
// part as a normal integer (i.e., without using exponential notation |
// or appending a '.0') as long as the value is within the range of a |
// 64-bit int. |
- OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 2, |
+ OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1, |
// Return a slightly nicer formatted json string (pads with whitespace to |
// help with readability). |
- OPTIONS_PRETTY_PRINT = 1 << 3 |
+ OPTIONS_PRETTY_PRINT = 1 << 2, |
}; |
// Given a root node, generates a JSON string and puts it into |json|. |
@@ -48,12 +43,8 @@ class BASE_EXPORT JSONWriter { |
static void WriteWithOptions(const Value* const node, int options, |
std::string* json); |
- // A static, constant JSON string representing an empty array. Useful |
- // for empty JSON argument passing. |
- static const char* kEmptyArray; |
- |
private: |
- JSONWriter(bool escape, bool omit_binary_values, |
+ JSONWriter(bool omit_binary_values, |
bool omit_double_type_preservation, bool pretty_print, |
std::string* json); |
@@ -61,13 +52,9 @@ class BASE_EXPORT JSONWriter { |
// json_string_ will contain the JSON. |
void BuildJSONString(const Value* const node, int depth); |
- // Appends a quoted, escaped, version of (UTF-8) str to json_string_. |
- void AppendQuotedString(const std::string& str); |
- |
// Adds space to json_string_ for the indent level. |
void IndentLine(int depth); |
- bool escape_; |
bool omit_binary_values_; |
bool omit_double_type_preservation_; |
bool pretty_print_; |