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

Unified Diff: base/json/json_file_value_serializer.cc

Issue 2475583002: Adds option for JSON reader to allow invalid utf characters (Closed)
Patch Set: comment Created 4 years, 1 month 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/json_file_value_serializer.h ('k') | base/json/json_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_file_value_serializer.cc
diff --git a/base/json/json_file_value_serializer.cc b/base/json/json_file_value_serializer.cc
index 1a9b7a23b2044c4f467924c8a9546ac0276b52dd..661d25d79843e4dd37cf1d775ccdeda51aa72bb0 100644
--- a/base/json/json_file_value_serializer.cc
+++ b/base/json/json_file_value_serializer.cc
@@ -53,11 +53,9 @@ bool JSONFileValueSerializer::SerializeInternal(const base::Value& root,
}
JSONFileValueDeserializer::JSONFileValueDeserializer(
- const base::FilePath& json_file_path)
- : json_file_path_(json_file_path),
- allow_trailing_comma_(false),
- last_read_size_(0U) {
-}
+ const base::FilePath& json_file_path,
+ int options)
+ : json_file_path_(json_file_path), options_(options), last_read_size_(0U) {}
JSONFileValueDeserializer::~JSONFileValueDeserializer() {
}
@@ -114,7 +112,6 @@ std::unique_ptr<base::Value> JSONFileValueDeserializer::Deserialize(
return NULL;
}
- JSONStringValueDeserializer deserializer(json_string);
- deserializer.set_allow_trailing_comma(allow_trailing_comma_);
+ JSONStringValueDeserializer deserializer(json_string, options_);
return deserializer.Deserialize(error_code, error_str);
}
« no previous file with comments | « base/json/json_file_value_serializer.h ('k') | base/json/json_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698