Nalaka1693 / json-simple

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

java.util.Date toString is incorrectly formatted by JSONObject #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create JSONObject
2. Store java.util.Date object in created JSONObject

What is the expected output? What do you see instead?
expected: A quoted string of the date object's toString() function.
instead: Quotes are missing.

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

Please provide any additional information below.
This can easily be fixed in JSONValue#writeJSONString(Object value, Writer 
out) => By default all non recognized Object's toString() functions should 
be quoted.

Original issue reported on code.google.com by DeRijcke.Erik@gmail.com on 16 Feb 2010 at 3:58

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Don't forget to escape the value.toString() as well.

Original comment by idr...@gmail.com on 26 May 2010 at 7:12

GoogleCodeExporter commented 8 years ago
You'll also need to modify the other writeJSONString methods

Original comment by idr...@gmail.com on 26 May 2010 at 7:13

GoogleCodeExporter commented 8 years ago

Original comment by fangyid...@gmail.com on 14 Jul 2010 at 1:15