Lines Matching defs:Json
25 // Parses a JSON dictionary of strings. Sample usage:
26 // scoped_ptr<Json> json(Json::Build());
28 // if (json->ParseObject("{'key1':'value1', 'key2':'value2'}") &&
29 // json->GetStringValueForKey("key1", &value)) {
32 class Json {
34 virtual ~Json();
36 // Returns a new instance of |Json| object.
37 static scoped_ptr<Json> Build();
39 // Parses the |json| string and returns true if |json| is valid and it is an
41 virtual bool ParseObject(const std::string& json) = 0;
45 // The JSON object must be parsed successfully in ParseObject() before
52 // dictionary. The JSON object must be parsed successfully in ParseObject()
56 scoped_ptr<Json>* value) const = 0;
59 Json();