@Test public void testMultilineStringClass() throws Exception { MultilineAnnotatedTestClass c = new MultilineAnnotatedTestClass(); JSONAnnotationEncoder encoder = new JSONAnnotationEncoder(); String json = encoder.encode(c); char[] charArray = new char[19]; int i = 0; charArray[i++] = '{'; charArray[i++] = '"'; charArray[i++] = 'm'; charArray[i++] = 'y'; charArray[i++] = 's'; charArray[i++] = '"'; charArray[i++] = ':'; charArray[i++] = '"'; charArray[i++] = 'b'; charArray[i++] = 'l'; charArray[i++] = 'a'; charArray[i++] = '\\'; charArray[i++] = 'n'; charArray[i++] = 't'; charArray[i++] = 'e'; charArray[i++] = 's'; charArray[i++] = 't'; charArray[i++] = '"'; charArray[i++] = '}'; String part1 = new String(charArray); TestCase.assertEquals(part1, 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);  }