Index: base/json/json_value_serializer.h |
diff --git a/base/json/json_value_serializer.h b/base/json/json_value_serializer.h |
index 650008ec235aab6d356098b7c8c5bde0c1f7b224..21ec37a89d2087a46324d5f61dca8cc1efbfa4e8 100644 |
--- a/base/json/json_value_serializer.h |
+++ b/base/json/json_value_serializer.h |
@@ -74,7 +74,8 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { |
// When deserializing, the file should exist, but when serializing, the |
// serializer will attempt to create the file at the specified location. |
explicit JSONFileValueSerializer(const FilePath& json_file_path) |
- : json_file_path_(json_file_path) {} |
+ : json_file_path_(json_file_path), |
+ allow_trailing_comma_(false) {} |
virtual ~JSONFileValueSerializer() {} |
@@ -116,8 +117,13 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { |
// be a JsonFileError. |
static const char* GetErrorMessageForCode(int error_code); |
+ void set_allow_trailing_comma(bool new_value) { |
+ allow_trailing_comma_ = new_value; |
+ } |
+ |
private: |
FilePath json_file_path_; |
+ bool allow_trailing_comma_; |
// A wrapper for file_util::ReadFileToString which returns a non-zero |
// JsonFileError if there were file errors. |