Open GoogleCodeExporter opened 8 years ago
Classes not in the table of the following link are not supposed to be supported:
http://code.google.com/p/json-simple/wiki/MappingBetweenJSONAndJavaEntities
But since date/time is used frequently, it can be considered an enhancement.
To make it work, you might want to convert it into a String before putting it
in the map:
fields.put("Time", String.valueOf(rs.getObject(i)))
Thanks.
Original comment by fangyid...@gmail.com
on 6 Jun 2010 at 6:08
I would agree with the OP's opinion. Any of these types should be supported and
serialised as String. These ones already have a meaningful toString() method:
- java.sql.Time
- java.sql.Timestamp
- java.sql.Date
This one could be converted into java.sql.Timestamp:
- java.util.Date
Original comment by lukas.eder@gmail.com
on 30 Jun 2011 at 12:58
Issue 58 has been merged into this issue.
Original comment by jon.cham...@gmail.com
on 10 Aug 2013 at 4:55
Issue 63 has been merged into this issue.
Original comment by jon.cham...@gmail.com
on 10 Aug 2013 at 4:56
Issue 27 has been merged into this issue.
Original comment by jon.cham...@gmail.com
on 10 Aug 2013 at 4:59
For what it's worth, I wish the library would throw an exception in the Object
case, as it is unknown if the JSON produced by calling Object.toString() is
valid JSON. I'm a believer in "fail-fast", rather than get bitten by badly
encoded JSON later (which is what happened to me).
Original comment by ober...@civicscience.com
on 4 Mar 2014 at 6:38
Original issue reported on code.google.com by
toma%rulez.org@gtempaccount.com
on 5 Jun 2010 at 3:06