@Test public void testTreeSet() throws Exception { AnnotatedTreeSetTestClass c = new AnnotatedTreeSetTestClass(); Set<String> values = new TreeSet<String>(); values.add("beta"); values.add("alpha"); values.add("gamma"); values.add("delta"); values.add("epsilon"); c.setValue(values); JSONAnnotationEncoder encoder = new JSONAnnotationEncoder(); String json = encoder.encode(c); TestCase.assertEquals("{\"value\":[\"alpha\",\"beta\",\"delta\",\"epsilon\",\"gamma\"]}", json); }
public String encode(Object result) throws JSONException { StringBuilder builder = new StringBuilder(); encode(result, builder, null); return builder.toString(); }
JSONAnnotationEncoder { public String encode(Object result) throws JSONException { StringBuilder builder = new StringBuilder(); encode(result, builder, null); return builder.toString(); } }
JSONAnnotationEncoder { public String encode(Object result) throws JSONException { StringBuilder builder = new StringBuilder(); encode(result, builder, null); return builder.toString(); }  }
JSONAnnotationEncoder { public String encode(Object result) throws JSONException { StringBuilder builder = new StringBuilder(); encode(result, builder, null); return builder.toString(); }  String encode(Object result); @SuppressWarnings("unchecked") void encode(Object result, StringBuilder builder, JSON annotation); }
JSONAnnotationEncoder { public String encode(Object result) throws JSONException { StringBuilder builder = new StringBuilder(); encode(result, builder, null); return builder.toString(); }  String encode(Object result); @SuppressWarnings("unchecked") void encode(Object result, StringBuilder builder, JSON annotation);  }