@Test public void testExtension() throws Exception { ExtendAnnotatedClass extend = new ExtendAnnotatedClass(); extend.setTest("HALLO"); extend.setTest1("WELT"); extend.setTest2(true); extend.setTest3(false); JSONAnnotationEncoder encoder = new JSONAnnotationEncoder(); String json = encoder.encode(extend); TestCase.assertEquals("{\"test\":\"HALLO\",\"test1\":\"WELT\",\"test2\":true,\"test3\":false}", 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);  }