public String apply(@Nullable Object input) {
return input instanceof String ? (String) input : null;
}
}), Predicates.notNull()));
} else if (type instanceof JSONSchemaObjectType) {
JSONSchemaObjectType objectType = (JSONSchemaObjectType) type;
JSONObject propertiesJSONObject = jsonObject.optJSONObject("properties");
if (propertiesJSONObject != null) {
objectType.setNamedProperties(_namedPropertyMarshaller.fromMappedJSONObject(propertiesJSONObject, null));
}
JSONObject patternPropertiesJSONObject = jsonObject.optJSONObject("patternProperties");
if (patternPropertiesJSONObject != null) {
objectType.setPatternProperties(_patternPropertyMarshaller.fromMappedJSONObject(patternPropertiesJSONObject, null));
}
Object additionalProperties = jsonObject.opt("additionalProperties");
if (additionalProperties instanceof JSONObject) {
objectType.setAdditionalPropertiesSchema(fromJSONObject((JSONObject) additionalProperties));
} else if (additionalProperties instanceof Boolean && !((Boolean) additionalProperties)) {
objectType.setAdditionalPropertiesSchema(null);
} else if (additionalProperties != null && additionalProperties != JSONObject.NULL) {
throw new IllegalArgumentException("Unsupported additional properties: " + additionalProperties);
}
} else if (type instanceof JSONSchemaArrayType) {
JSONSchemaArrayType arrayType = (JSONSchemaArrayType) type;