use of org.activiti.engine.impl.util.json.JSONObject in project CzechIdMng by bcvsolutions.
the class AbstractRestTest method getEmbeddedList.
public List<LinkedHashMap<String, Object>> getEmbeddedList(String nameEmbeddedList, String json) throws IOException {
JSONObject tObject = new JSONObject(json);
String embeddedString = tObject.get("_embedded").toString();
tObject = new JSONObject(embeddedString);
// get embedded list
String listString = tObject.get(nameEmbeddedList).toString();
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(listString, new TypeReference<List<LinkedHashMap<String, Object>>>() {
});
}
Aggregations