discomarathon / google-gson

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

Add option to provide Locale for DateFormat #223

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
http://groups.google.com/group/google-gson/browse_thread/thread/eb5f416a7a2d5ffd

http://jansouza.com/2010/07/14/google-json-java/

Original issue reported on code.google.com by inder123 on 14 Jul 2010 at 5:37

GoogleCodeExporter commented 9 years ago

Original comment by jango...@gmail.com on 15 Jul 2010 at 3:13

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 183 has been merged into this issue.

Original comment by limpbizkit on 6 Oct 2010 at 6:39

GoogleCodeExporter commented 9 years ago
Issue 222 has been merged into this issue.

Original comment by limpbizkit on 6 Oct 2010 at 6:39

GoogleCodeExporter commented 9 years ago
FYI: it's probably a bad idea to localize the date in interchange formats. GSON 
would probably be best to always use ISO 8601.

Original comment by limpbizkit on 6 Oct 2010 at 6:41

GoogleCodeExporter commented 9 years ago
JSON will now always format using the default locale and parse using that, then 
US, then ISO 8601. It would be nice to add an API to prefer Locale.US by 
default. I don't think there's much utility in supporting arbitrary locales, 
because other programs don't know how to parse those - JSON documents should 
not be localized.

Original comment by limpbizkit on 14 Feb 2011 at 10:26

GoogleCodeExporter commented 9 years ago
What about serializing by default to ISO8601?  Personally I would rather have 
an option to store is as a long.

Original comment by a...@trajano.net on 29 May 2012 at 4:28