exmeso
exmeso copied to clipboard
The sample code gets an error
The sample code to sort json file gets org.codehaus.jackson.map.RuntimeJsonMappingException as you see in exception.txt. The reason is a bug of org.codehaus.jackson.map.MappingIterator.java, you cannot invoke hasNext() two times or more when it hits END_ARRAY token, ']'. Because codehaus is no more maintained, it's better to migrate to its successor: com.fasterxml.jackson. You can see a sample migration in JacksonSerializer.zip. The differences from the original code are shown in JacksonSerializer.java.pdf.