7879808182838485868788
root.add(containerId); root.add(segmentId); root.add(id); root.add(data); out.println(root.toJSONString()); } catch (Exception e) { out.println(JSONHelper.createErrorNode(e)); }
1213141516171819202122
@Test public void test() { JSONNode node = new JSONNode(); assertEquals("{}", node.toJSONString()); node.add(new JSONAttribute("id", "0", AttrType.Number)); node.add(new JSONAttribute("name", "root object", AttrType.String));
7677787980818283848586
JSONAttribute id = new JSONAttribute("blockId", ""+blockId.getId(), AttrType.Number); root.add(containerId); root.add(segmentId); root.add(id); out.println(root.toJSONString()); } catch (Exception e) { out.println(JSONHelper.createErrorNode(e)); }