wecoppens / json-smart

Automatically exported from code.google.com/p/json-smart
0 stars 0 forks source link

Strange problem - Inverting integer arrays numbers #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using this code:
JSONObject resultObject = new JSONObject();
resultObject.put("intArray", new int[]{1, 2, 50, 1234, 10000});
System.out.println("RESULT: " + resultObject.toJSONString());

The output is:
RESULT: {"intArray":[1,2,05,4321,00001]}

I'm using json-smart-1.1.jar

Original issue reported on code.google.com by tiago.m...@lumentech.cc on 16 Mar 2012 at 5:27

GoogleCodeExporter commented 8 years ago
The output should be
RESULT: {"intArray":[1,2,50,1234,10000]}

I can't see anything wrong with my code :/

Original comment by tiago.m...@lumentech.cc on 16 Mar 2012 at 5:28

GoogleCodeExporter commented 8 years ago
Some more info...

The problem dissappears when using arrays of Integer[]

Original comment by tiago.m...@lumentech.cc on 16 Mar 2012 at 5:47

GoogleCodeExporter commented 8 years ago
OUPS....

Original comment by uriel.chemouni on 20 Mar 2012 at 9:04

GoogleCodeExporter commented 8 years ago
Fixed onto Git

Original comment by uriel.chemouni on 20 Mar 2012 at 9:40

GoogleCodeExporter commented 8 years ago
released

Original comment by uriel.chemouni on 3 Apr 2012 at 9:59

GoogleCodeExporter commented 8 years ago

Original comment by uriel.chemouni on 3 Apr 2012 at 9:59