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

Unified Diff: base/json/json_value_serializer.h

Issue 8505033: Allow JSONWriter and JSONValueSerializer to omit binary values when instructed to do so. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address lint warning. Created 9 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 | « no previous file | base/json/json_value_serializer.cc » ('j') | base/json/json_writer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..01564922446964c264981f02764055e0ca94a55f 100644
--- a/base/json/json_value_serializer.h
+++ b/base/json/json_value_serializer.h
@@ -38,8 +38,11 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
// Attempt to serialize the data structure represented by Value into
// JSON. If the return value is true, the result will have been written
- // into the string passed into the constructor.
+ // into the string passed into the constructor. In the overloaded method,
Jói 2011/11/10 11:08:16 Please document this separately rather than togeth
Eric Dingle 2011/11/10 15:05:25 Done.
+ // |ignore_binary_values| is used to indicate how the serializer should
+ // behave when encountering a binary value.
virtual bool Serialize(const Value& root);
+ virtual bool Serialize(const Value& root, bool ignore_binary_values);
// Attempt to deserialize the data structure encoded in the string passed
// in to the constructor into a structure of Value objects. If the return
@@ -87,6 +90,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
// JSON. If the return value is true, the result will have been written
// into the file whose name was passed into the constructor.
virtual bool Serialize(const Value& root);
+ virtual bool Serialize(const Value& root, bool ignore_binary_values);
// Attempt to deserialize the data structure encoded in the file passed
// in to the constructor into a structure of Value objects. If the return
« no previous file with comments | « no previous file | base/json/json_value_serializer.cc » ('j') | base/json/json_writer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698