called when json-smart parser meet an object key
352032
public JsonReaderI<?> startObject(String key) throws ParseException, IOException {
		Object bean = mapper.getValue(obj, key);
		if (bean == null)
			return mapper.startObject(key);
		return new UpdaterMapper<Object>(base, bean, mapper.getType(key));
	}
156385
function validate(key) {
        var type = getType(key);
        if (type === "array") {
            for (var i = 0; i < key.length; i++) {
                validate(key[i]);
            }
        }
        else if (!types[type] || (type !== "string" && isNaN(key))) {
            throw idbModules.util.createDOMException("DataError", "Not a valid key");
        }
    }
103011
public void registerJsonValueProcessor( Class beanClass, String key, JsonValueProcessor jsonValueProcessor ) {
      if( beanClass != null && key != null && jsonValueProcessor != null ) {
         beanKeyMap.put( beanClass, key, jsonValueProcessor );
      }
   }
345432
private void beforeKey() throws JSONException {
        Scope context = peek();
        if (context == Scope.NONEMPTY_OBJECT) { // first in object
            out.append(',');
        } else if (context != Scope.EMPTY_OBJECT) { // not in an object!
            throw new JSONException("Nesting problem");
        }
        newline();
        replaceTop(Scope.DANGLING_KEY);
    }
698248
private static Optional<ICondition> asAnyOf( JsonObject json)
    {
    return
      json.containsKey( ANY_OF_KEY)
      ? Optional.of( new AnyOf( toConditions( json.getJsonArray( ANY_OF_KEY))))
      : Optional.empty();
    }
444240
function isValidJSON(arg) {
    var parsed;
    if (!lodash.isString(arg)) {
      return false;
    }
    try {
      parsed = JSON.parse(arg);
    } catch (e) {
      return false;
    }
    if (typeof(parsed) === 'object') {
      return true;
    }
    return false;
  }
1090167
function ( obj, key, value ) {
		if ( value !== undefined ) {
			obj.setAttribute( "data-" + key, regex.json_wrap.test( value ) ? json.encode( value ) : value );
			return obj;
		}
		else {
			return utility.coerce( obj.getAttribute( "data-" + key ) );
		}
	}
127257
function (parsed_key, options)
{
    "use strict";

    this.key = parsed_key;

    options = options || {};

    this.options = {};
    this.options.json = options.json !== false;
    this.options.check = options.check !== false;
    this.options.pad = options.pad !== false;
    this.options.custom = options.custom;

    this.encoding = options.base64 !== false ? 'base64' : undefined;
}
347733
function (key) {
                storage.removeAttribute(getMappedKey(key));
                setMappedKey(null, key);
                storage.save("JSONPersist");
            }
213502
private JSONObject parseJSONObject() throws ParseException {
        expect('{');
        skipWhitespace();
        if (peek() == '}') {
            // Empty object
            next();
            return new JSONObject(Collections.<Entry<String, Object>> emptyList());
        }

        final List<Entry<String, Object>> kvPairs = new ArrayList<>();
        final JSONObject jsonObject = new JSONObject(kvPairs);
        boolean first = true;
        while (peek() != '}') {
            if (first) {
                first = false;
            } else {
                expect(',');
            }
            final CharSequence key = parseString();
            if (key == null) {
                throw new ParseException(this, "Object keys must be strings");
            }
            if (peek() != ':') {
                return null;
            }
            expect(':');
            final Object value = parseJSON();

            // Check for special object id key
            if (key.equals(JSONUtils.ID_KEY)) {
                if (value == null) {
                    throw new ParseException(this, "Got null value for \"" + JSONUtils.ID_KEY + "\" key");
                }
                jsonObject.objectId = (CharSequence) value;
            } else {
                kvPairs.add(new SimpleEntry<>(key.toString(), value));
            }
        }
        expect('}');
        return jsonObject;
    }
363154
public static boolean isNullObject(JSONObject jsonObject, String key) throws JSONException {
		checkArguments(jsonObject, key);
		JSONValue value = jsonObject.get(key);

		boolean isNull = false;
		if (value == null || value.isNull() != null) {
			isNull = true;
		}
		return isNull;
	}
262837
function(key)
        {
            // get value
            var val = this.getItem(key);

            // if null, return null
            if (val === null) {
                return null;
            }

            // parse and return value
            return JSON.parse(val);
        }
260598
public <T> void setObject(DataKey<T> key, T object) {
        if (key == null) {
            throw new IllegalArgumentException("key must not be null");
        }
        if (object == null && !key.allowNull()) {
            throw new IllegalArgumentException("key \"" + key.getName() + "\" disallows null values but object was null");
        }
        data.put(key.getName(), object);
    }
213837
private Date readOptionalDate(JSONObject json, String key) {

        try {
            String str = json.getString(key);
            return new Date(Long.parseLong(str));
        } catch (NumberFormatException | JSONException e) {
            LOG.debug("Reading optional JSON Long failed. Default to provided default value.", e);
        }
        return null;
    }
567794
private Map parseObject(JsonLexer lexer) {
        Map content = new HashMap();

        JsonToken previousToken = null;
        JsonToken currentToken = null;

        for(;;) {
            currentToken = lexer.nextToken();

            if (currentToken == null) {
                throw new JsonException(
                        "Expected a String key on line: " + lexer.getReader().getLine() + ", " +
                                "column: " + lexer.getReader().getColumn() + ".\n" +
                                "But got an unterminated object."
                );
            }

            // expect a string key, or already a closing curly brace

            if (currentToken.getType() == CLOSE_CURLY) {
                return content;
            } else if (currentToken.getType() != STRING) {
                throw new JsonException(
                        "Expected " + STRING.getLabel() + " key " +
                                "on line: " + currentToken.getStartLine() + ", " +
                                "column: " + currentToken.getStartColumn() + ".\n" +
                                "But got '" + currentToken.getText() + "' instead."
                );
            }

            String mapKey = (String) currentToken.getValue();

            currentToken = lexer.nextToken();

            if (currentToken == null) {
                throw new JsonException(
                        "Expected a " + COLON.getLabel() + " " +
                                "on line: " + lexer.getReader().getLine() + ", " +
                                "column: " + lexer.getReader().getColumn() + ".\n" +
                                "But got an unterminated object."
                );
            }

            // expect a colon between the key and value pair

            if (currentToken.getType() != COLON) {
                throw new JsonException(
                        "Expected " + COLON.getLabel() + " " +
                                "on line: " + currentToken.getStartLine() + ", " +
                                "column: " + currentToken.getStartColumn() + ".\n" +
                                "But got '" + currentToken.getText() + "' instead."
                );
            }

            currentToken = lexer.nextToken();

            if (currentToken == null) {
                throw new JsonException(
                        "Expected a value " +
                                "on line: " + lexer.getReader().getLine() + ", " +
                                "column: " + lexer.getReader().getColumn() + ".\n" +
                                "But got an unterminated object."
                );
            }

            // value can be an object, an array, a number, string, boolean or null values

            if (currentToken.getType() == OPEN_CURLY) {
                content.put(mapKey, parseObject(lexer));
            } else if (currentToken.getType() == OPEN_BRACKET) {
                content.put(mapKey, parseArray(lexer));
            } else if (currentToken.getType().ordinal() >= NULL.ordinal()) {
                content.put(mapKey, currentToken.getValue());
            } else {
                throw new JsonException(
                        "Expected a value, an array, or an object " +
                                "on line: " + currentToken.getStartLine() + ", " +
                                "column: " + currentToken.getStartColumn() + ".\n" +
                                "But got '" + currentToken.getText() + "' instead."
                );
            }

            previousToken = currentToken;
            currentToken = lexer.nextToken();

            // premature end of the object

            if (currentToken == null) {
                throw new JsonException(
                        "Expected " + CLOSE_CURLY.getLabel() + " or " + COMMA.getLabel() + " " +
                                "on line: " + previousToken.getEndLine() + ", " +
                                "column: " + previousToken.getEndColumn() + ".\n" +
                                "But got an unterminated object."
                );
            }

            // Expect a comma for an upcoming key/value pair
            // or a closing curly brace for the end of the object
            if (currentToken.getType() == CLOSE_CURLY) {
                break;
            } else if (currentToken.getType() != COMMA) {
                throw new JsonException(
                        "Expected a value or " + CLOSE_CURLY.getLabel() + " " +
                                "on line: " + currentToken.getStartLine() + ", " +
                                "column: " + currentToken.getStartColumn() + ".\n" +
                                "But got '" + currentToken.getText() + "' instead."
                );
            }
        }

        return content;
    }
432693
String parseObjectKey() throws IOException {
        if (cachedObjectKey != null) {
            String key = cachedObjectKey;
            cachedObjectKey = null;
            return key;
        }
        String str = parseString();
        acceptEvent(JsonEvent.COLON);
        return str;
    }
1084564
private JsonValue getFromJsonArray(String key, int index){
        PiwikJsonArray a = (PiwikJsonArray)parameters.get(key);
        if (a == null){
            return null;
        }
        
        return a.get(index);
    }