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

Unified Diff: chromeos/tools/onc_validator/onc_validator.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 | « chromeos/network/onc/onc_utils_unittest.cc ('k') | components/bookmarks/browser/bookmark_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/tools/onc_validator/onc_validator.cc
diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc
index 18a3f36a6a94f17c64a9d9395f57dd1cec2f08d6..0a7275f67ea03bd94613d4ccf028333c0fd9a3e6 100644
--- a/chromeos/tools/onc_validator/onc_validator.cc
+++ b/chromeos/tools/onc_validator/onc_validator.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/values.h"
#include "chromeos/network/onc/onc_signature.h"
@@ -89,8 +90,8 @@ void PrintHelp() {
std::unique_ptr<base::DictionaryValue> ReadDictionary(
const std::string& filename) {
base::FilePath path(filename);
- JSONFileValueDeserializer deserializer(path);
- deserializer.set_allow_trailing_comma(true);
+ JSONFileValueDeserializer deserializer(path,
+ base::JSON_ALLOW_TRAILING_COMMAS);
std::string json_error;
std::unique_ptr<base::Value> value =
« no previous file with comments | « chromeos/network/onc/onc_utils_unittest.cc ('k') | components/bookmarks/browser/bookmark_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698