Assert.assertThat(JsonStringWriter.escapeSpecialCharacter(ch1), is("\\u0001"));
Assert.assertThat(JsonStringWriter.escapeSpecialCharacter(ch2), is("\\u0000"));
Assert.assertThat(JsonStringWriter.escapeSpecialCharacter(ch3), is("\\u000f"));
Assert.assertThat(JsonStringWriter.escapeSpecialCharacter(ch4), is("\\u0010"));
SimpleObj i = new SimpleObj();
i.setName("PengtaoQiu\nAlvin\nhttp://fireflysource.com" + String.valueOf(ch1) + String.valueOf(ch2) + String.valueOf(ch3) + String.valueOf(ch4) + String.valueOf(ch));
String jsonStr = Json.toJson(i);
System.out.println(jsonStr);
SimpleObj i2 = Json.toObject(jsonStr, SimpleObj.class);
Assert.assertThat((int)i2.getName().charAt(i2.getName().length() - 1), is(31));
Assert.assertThat((int)i2.getName().charAt(i2.getName().length() - 2), is(16));
Assert.assertThat((int)i2.getName().charAt(i2.getName().length() - 3), is(15));
Assert.assertThat((int)i2.getName().charAt(i2.getName().length() - 4), is(0));
Assert.assertThat((int)i2.getName().charAt(i2.getName().length() - 5), is(1));
System.out.println(Json.toJson(i2));
}