Lines Matching refs:Value
33 // takes ownership of the input string. The real root value is Swap()ed into
37 DictionaryHiddenRootValue(std::string* json, Value* root) : json_(json) {
38 DCHECK(root->IsType(Value::TYPE_DICTIONARY));
61 scoped_ptr<Value>* out) override {
62 // If the caller won't take ownership of the removed value, just call up.
68 // Otherwise, remove the value while its still "owned" by this and copy it
70 scoped_ptr<Value> out_owned;
87 ListHiddenRootValue(std::string* json, Value* root) : json_(json) {
88 DCHECK(root->IsType(Value::TYPE_LIST));
107 bool Remove(size_t index, scoped_ptr<Value>* out) override {
108 // If the caller won't take ownership of the removed value, just call up.
114 // Otherwise, remove the value while its still "owned" by this and copy it
116 scoped_ptr<Value> out_owned;
132 // into the Value. This can only be stored in a child of hidden root (above),
134 class JSONStringValue : public Value {
137 : Value(TYPE_STRING),
141 // Overridden from Value:
150 Value* DeepCopy() const override {
153 bool Equals(const Value* other) const override {
206 Value* JSONParser::Parse(const StringPiece& input) {
238 scoped_ptr<Value> root(ParseNextToken());
253 if (root->IsType(Value::TYPE_DICTIONARY)) {
255 } else if (root->IsType(Value::TYPE_LIST)) {
257 } else if (root->IsType(Value::TYPE_STRING)) {
466 Value* JSONParser::ParseNextToken() {
470 Value* JSONParser::ParseToken(Token token) {
490 Value* JSONParser::ConsumeDictionary() {
526 // The next token is the value. Ownership transfers to |dict|.
528 Value* value = ParseNextToken();
529 if (!value) {
534 dict->SetWithoutPathExpansion(key.AsString(), value);
554 Value* JSONParser::ConsumeList() {
571 Value* item = ParseToken(token);
597 Value* JSONParser::ConsumeString() {
602 // Create the Value representation, using a hidden root, if configured
824 Value* JSONParser::ConsumeNumber() {
919 Value* JSONParser::ConsumeLiteral() {
952 return Value::CreateNullValue().release();