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

Unified Diff: third_party/libaddressinput/chromium/cpp/src/util/json.h

Issue 106763007: [rac] Parse postal code formats and required fields in libaddressinput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test that parsing empty data does not overwrite a rule. Created 6 years, 12 months 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
Index: third_party/libaddressinput/chromium/cpp/src/util/json.h
diff --git a/third_party/libaddressinput/chromium/cpp/src/util/json.h b/third_party/libaddressinput/chromium/cpp/src/util/json.h
index a96b0b3e80d96a8c25c3831232d0df665f8afa38..d6405439f76e8af7b9a9d8126811c8d7f9b6d572 100644
--- a/third_party/libaddressinput/chromium/cpp/src/util/json.h
+++ b/third_party/libaddressinput/chromium/cpp/src/util/json.h
@@ -24,9 +24,10 @@ namespace addressinput {
// Parses a JSON dictionary of strings. Sample usage:
// scoped_ptr<Json> json(Json::Build());
+// std::string value;
// if (json->ParseObject("{'key1':'value1', 'key2':'value2'}") &&
-// json->HasStringKey("key1")) {
-// Process(json->GetStringValueForKey("key1"));
+// json->GetStringValueForKey("key1", &value)) {
+// Process(value);
// }
class Json {
public:

Powered by Google App Engine
This is Rietveld 408576698