public void testToJSON() throws Exception { AdverseEventDTO ae = new AdverseEventDTO(); TermDTO t = new TermDTO(); t.setCode("1001"); t.setId(1); t.setName("Nausea"); ae.setTerm(t); ae.setGrade("NORMAL"); ae.setWhySerious("YES"); ae.setExpected("true"); ae.setAttribution("LIKELY"); ae.setVerbatim("Sick to Stomach"); String s = JSONUtils.toJSON(ae); System.out.println(s); }
public static String toJSONString(Props props, boolean localOnly) { Map<String, String> map = toStringMap(props, localOnly); return JSONUtils.toJSON(map); }