String input = "{ id: 123, name: \"foo \\\"bar\" }";
assertEquals( "{id:123,name:\"foo \\\"bar\"}", write(input) );
}
public void testIssue109() throws Exception {
TAlbums tpl = new TAlbums();
List<Album> albums = new ArrayList<Album>();
final Artist artist = new Artist.Builder().id(1).name("Artist\"").build();
albums.add( new Album.Builder()
.artist(artist)
.id(2)
.name("Album\"")
.year("1980")
.build()
);
tpl.setAlbums(albums);
tpl.makeRenderer().renderTo(jsonWriter);
String expected = "[{\"id\":2,\"name\":\"Album\\\"\",\"date_added\":\"null\",\"artist\":{\"id\":1,\"name\":\"Artist\\\"\",\"date_added\":\"null\"}}]";
String actual = stringWriter.toString();
assertEquals( expected, actual );