Collection<Item> processDefinitionTreeList = makeChildren(processDefinitionList, "-1", 0);
if (processDefinitionTreeList == null) {
processDefinitionTreeList = new ArrayList<Item>();
}
ItemCollection itemCollection = new ItemCollection("name", "id", processDefinitionTreeList);
XStream xstream = new XStream(new JsonHierarchicalStreamDriver() {
public HierarchicalStreamWriter createWriter(Writer writer) {
return new JsonWriter(writer, JsonWriter.DROP_ROOT_MODE);
}