Suppose than jsonObject is single and contains valid id :)
557855
protected Object readResponse(Type returnType, JsonNode jsonObject) throws Throwable {
		return readResponse(returnType, jsonObject, null);
	}
381164
private static Identity parse(final JsonObject json) {
        final Map<String, String> props = new HashMap<>(json.size());
        final Opt<JsonObject> image = new Opt.Single<>(
            json.getJsonObject("image")
        );
        if (image.has()) {
            props.put(PsGoogle.PICTURE, image.get().getString("url", "#"));
        } else {
            props.put(PsGoogle.PICTURE, "#");
        }
        props.put(
            PsGoogle.NAME, json.getString(PsGoogle.DISPLAY_NAME, "unknown")
        );
        return new Identity.Simple(
            String.format("urn:google:%s", json.getString("id")), props
        );
    }
590384
private String createIdentifier(JsonNode object) {
		JsonNode idNode = object.get(ID);

		String id = idNode != null ? idNode.asText().trim() : "";

		if (id.isEmpty() && deserializationFeatures.contains(DeserializationFeature.REQUIRE_RESOURCE_ID)) {
			throw new IllegalArgumentException(String.format("Resource must have a non null and non-empty 'id' attribute! %s", object.toString()));
		}

		String type = object.get(TYPE).asText();
		return type.concat(id);
	}
1329810
@Nullable
    private static Object json(@Nullable Object in) {
        if (in == null) return null;
        return new Object() {
            @Override
            public String toString() {
                return "{\"fake-key\": \"fake-value\"}";
            }
        };
    }
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();
    }
610066
private static Optional<ICondition> asEquals( JsonObject json)
    {
    return
      Optional.of( json)
      .filter( j -> j.containsKey( EQUALS_KEY))
      .map( j -> j.getJsonObject( EQUALS_KEY))
      .map( e -> new Equals( e.getString( PROPERTY_KEY), e.getInt( COUNT_KEY)));
    }
376359
private static ICondition asCondition( JsonObject json)
    {
    List<Function<JsonObject,Optional<ICondition>>> converters = Arrays.asList
      (
        SystemInputJson::asContainsAll,
        SystemInputJson::asContainsAny,
        SystemInputJson::asContainsNone,
        SystemInputJson::asNot,
        SystemInputJson::asAnyOf,
        SystemInputJson::asAllOf,
        SystemInputJson::asLessThan,
        SystemInputJson::asMoreThan,
        SystemInputJson::asNotLessThan,
        SystemInputJson::asNotMoreThan,
        SystemInputJson::asBetween,
        SystemInputJson::asEquals
       );

    return
      converters.stream()
      .map( converter -> converter.apply( json))
      .filter( Optional::isPresent)
      .map( Optional::get)
      .findFirst()
      .orElseThrow( () -> new SystemInputException( String.format( "Unknown condition type: %s", json.keySet().iterator().next())))
      ;
    }
905557
function isJson(was){
		try{
			return _.isString(was) && _.isObject(JSON.parse(was));
		} catch(e){
			return false;
		}
	}
888761
public static boolean getBoolean(JSONValue value) {
        if (value == null)
            return false;
        if (!(value instanceof JSONBoolean))
            throw new JSONException(NOT_A_BOOLEAN);
        return ((JSONBoolean)value).booleanValue();
    }
951536
private static Optional<ICondition> asNot( JsonObject json)
    {
    return
      json.containsKey( NOT_KEY)
      ? Optional.of( new Not( asCondition( json.getJsonObject( NOT_KEY))))
      : Optional.empty();
    }
1080737
private static Optional<ICondition> asBetween( JsonObject json)
    {
    return
      Optional.of( json)
      .filter( j -> j.containsKey( BETWEEN_KEY))
      .map( j -> j.getJsonObject( BETWEEN_KEY))
      .map( b -> 
        new Between(
          b.containsKey( EXCLUSIVE_MIN_KEY)
          ? new AssertMore( b.getString( PROPERTY_KEY), b.getInt( EXCLUSIVE_MIN_KEY))
          : new AssertNotLess( b.getString( PROPERTY_KEY), b.getInt( MIN_KEY)),

          b.containsKey( EXCLUSIVE_MAX_KEY)
          ? new AssertLess( b.getString( PROPERTY_KEY), b.getInt( EXCLUSIVE_MAX_KEY))
          : new AssertNotMore( b.getString( PROPERTY_KEY), b.getInt( MAX_KEY))));
    }
920073
public static JSONObject getObject(JSONValue value) {
        if (value == null)
            return null;
        if (!(value instanceof JSONObject))
            throw new JSONException(NOT_AN_OBJECT);
        return (JSONObject)value;
    }
369809
public static IssueStatus parseStatus(JSONObject object)
			throws JSONException {
		final int id = JsonInput.getInt(object, "id");
		final String name = JsonInput.getStringNotNull(object, "name");
		final IssueStatus result = new IssueStatus(id, name);
		if (object.has("is_default"))
			result.setDefaultStatus(JsonInput.getOptionalBool(object,
					"is_default"));
		if (object.has("is_closed"))
			result.setClosed(JsonInput.getOptionalBool(object, "is_closed"));
		return result;
	}
627646
public static JSONObject parseObj(Object obj, boolean ignoreNullValue, boolean isOrder) {
		return new JSONObject(obj, ignoreNullValue, isOrder);
	}
210369
function() {
    if (this._isSerializing){ return this.id || this.cid; }
    this._isSerializing = true;
    var json = _.clone(this.attributes);
    _.each(json, function(value, name) {
        if( _.isNull(value) || _.isUndefined(value) ){ return void 0; }
        _.isFunction(value.toJSON) && (json[name] = value.toJSON());
    });
    this._isSerializing = false;
    return json;
  }
199722
public static boolean getBoolean(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asBoolean();
    }
1295334
public static String findUniqueKey(JSONArray expected) throws JSONException {
        // Find a unique key for the object (id, name, whatever)
        JSONObject o = (JSONObject) expected.get(0); // There's at least one at this point
        for (String candidate : getKeys(o)) {
            if (isUsableAsUniqueKey(candidate, expected)) return candidate;
        }
        // No usable unique key :-(
        return null;
    }