@Test public void testToJson_prettyString() { RemotingSerializable serializable = new RemotingSerializable() { private List<String> stringList = Arrays.asList("a", "o", "e", "i", "u", "v"); public List<String> getStringList() { return stringList; } public void setStringList(List<String> stringList) { this.stringList = stringList; } }; String prettyString = serializable.toJson(true); assertThat(prettyString).isEqualTo("{\n" + "\t\"stringList\":[\n" + "\t\t\"a\",\n" + "\t\t\"o\",\n" + "\t\t\"e\",\n" + "\t\t\"i\",\n" + "\t\t\"u\",\n" + "\t\t\"v\"\n" + "\t]\n" + "}"); }
public static String toJson(final Object obj, boolean prettyFormat) { return JSON.toJSONString(obj, prettyFormat); }
RemotingSerializable { public static String toJson(final Object obj, boolean prettyFormat) { return JSON.toJSONString(obj, prettyFormat); } }
RemotingSerializable { public static String toJson(final Object obj, boolean prettyFormat) { return JSON.toJSONString(obj, prettyFormat); }  }
RemotingSerializable { public static String toJson(final Object obj, boolean prettyFormat) { return JSON.toJSONString(obj, prettyFormat); }  static byte[] encode(final Object obj); static String toJson(final Object obj, boolean prettyFormat); static T decode(final byte[] data, Class<T> classOfT); static T fromJson(String json, Class<T> classOfT); byte[] encode(); String toJson(); String toJson(final boolean prettyFormat); }
RemotingSerializable { public static String toJson(final Object obj, boolean prettyFormat) { return JSON.toJSONString(obj, prettyFormat); }  static byte[] encode(final Object obj); static String toJson(final Object obj, boolean prettyFormat); static T decode(final byte[] data, Class<T> classOfT); static T fromJson(String json, Class<T> classOfT); byte[] encode(); String toJson(); String toJson(final boolean prettyFormat);  }