This content has been marked as final.
Show 1 reply
-
1. Re: How to read json data in JBPM (Red Hat BPM)?
lakshmikanthareddy Jul 12, 2019 6:41 PM (in response to karthik07m)You need to create the POJO class as per your API Response.
For example
String result ="jsobresponse";
APIResponse resp =
(APIResponse ) Transformer.objectCreatorFromJSON(result, APIResponse .class);
Create the Transformer util class and defined the method as below
public static Object objectCreatorFromJSON(String jsonObj, Class<?> valueType)
throws IOException {
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(jsonObj, valueType);
}