What steps will reproduce the problem?
1. Run the test
@Test
public void json_pretty_printing_bug() {
Map<String, Object> map = new HashMap<String, Object>();
map.put("F868", new Object());
map.put("F867", new Object());
map.put("ID", new Object());
GsonBuilder builder = new GsonBuilder();
builder.setPrettyPrinting();
Gson gson = builder.create();
assertEquals("{\"F868\":{},\"F867\":{},\"ID\":{}}", gson.toJson(map));
}
What is the expected output? What do you see instead?
Expected: {"F868":{},"F867":{},"ID":{}}
Actual: {"F868":{}"F867":{}"ID":{}}
What version of the product are you using? On what operating system?
1.3
Please provide any additional information below.
removing setPrettyPrinting() solves the problem
Original issue reported on code.google.com by gianmarco.gherardi on 10 Sep 2010 at 7:30
Original issue reported on code.google.com by
gianmarco.gherardi
on 10 Sep 2010 at 7:30