use of com.jayway.jsonpath.spi.mapper.JsonOrgMappingProvider in project phoenix by apache.
the class JsonEventSerializer method getPatternData.
private String getPatternData(JSONObject json, String pattern) {
Configuration JSON_ORG_CONFIGURATION = Configuration.builder().mappingProvider(new JsonOrgMappingProvider()).jsonProvider(new JsonOrgJsonProvider()).build();
String value;
try {
Object object = JsonPath.using(JSON_ORG_CONFIGURATION).parse(json).read(pattern);
value = object.toString();
} catch (Exception e) {
value = null;
}
return value;
}
Aggregations