I should mention that this is spring 2.5.6 and spring-json-1.2, which was downloaded only a couple of days ago. The problem existed in spring-json-1.1, too, at least with the jsonlib writer.