This code:
JSONArray jsa = new JSONArray(); jsa.element("\"test\""); System.out.println(jsa.toString());
Produces:
["test"]
However, this code:
List v = new Vector(); v.add("\"test\""); System.out.println(JSONSerializer.toJSON(v));
["\"test\""]
I would expect the behavior from the second example. Is there a reason for this behavior or is it a bug?
- Abre Chase
Hi AbreChase,
Sorry for the late reply, this may be indeed a bug, please feel free to file a bug at the issue tracker.
Thanks!
Log in to post a comment.
This code:
JSONArray jsa = new JSONArray();
jsa.element("\"test\"");
System.out.println(jsa.toString());
Produces:
["test"]
However, this code:
List v = new Vector();
v.add("\"test\"");
System.out.println(JSONSerializer.toJSON(v));
Produces:
["\"test\""]
I would expect the behavior from the second example. Is there a reason for this behavior or is it a bug?
- Abre Chase
Hi AbreChase,
Sorry for the late reply, this may be indeed a bug, please feel free to file a bug at the issue tracker.
Thanks!