Lovelyxredxpanda / json-simple

Automatically exported from code.google.com/p/json-simple
Apache License 2.0
0 stars 0 forks source link

Allow to put primitive types (boolean, int, ...) #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. new JSONObject().put("isAlive",true);

What is the expected output? What do you see instead?
Expected : {"isAlive":true}
Instead : doesn't compile, an object is required instead of a primitive type 
like 'true'.

What version of the product are you using? On what operating system?
Jdk 1.4

Original issue reported on code.google.com by cbo...@gmail.com on 29 Jul 2010 at 1:19

GoogleCodeExporter commented 9 years ago
This a feature request, not a defect.

BTW, this library is cool..

Original comment by cbo...@gmail.com on 29 Jul 2010 at 1:20

GoogleCodeExporter commented 9 years ago
JSONObject is a java.util.Map and it supports what a Map does. JDK 1.5 should 
do such kind of auto-boxing work.

Original comment by fangyid...@gmail.com on 29 Jul 2010 at 2:16