This project is archived and is in readonly mode.
JSON decoder date-converter is overeager
Reported by Jonathan del Strother | December 29th, 2008 @ 02:32 AM | in 2.x
The json decoder tries to recognise dates & reformats them so that Date/Time objects will get created. I'm pretty sure the regular expression for spotting the date is missing a couple of brackets. It has 2 sub-expressions, separated by an '|', which binds less tightly than the anchor points at either end, so the first sub-expression is only anchored at the beginning, and the second sub-expression is only anchored at the end.
The attached patch adds tests & fixes the regex.
Comments and changes to this ticket
-
Jonathan del Strother December 29th, 2008 @ 11:37 AM
- Tag set to patch
- Title changed from [PATCH] JSON decoder date-converter is overeager to JSON decoder date-converter is overeager
-
Repository January 7th, 2009 @ 05:53 PM
- State changed from new to resolved
(from [17da45b789e0a2581eae6e6b2b1ae8d2b98e0f5d]) Fix JSON decoder date-converter regexp [#1662 state:resolved] [Jonathan del Strother] http://github.com/rails/rails/co...
-
Repository February 2nd, 2009 @ 07:57 PM
(from [b1530545d259c144770bd8fd7881cb16160c0afc]) Fix JSON decoder date-converter regexp [#1662 state:resolved] [Jonathan del Strother] http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1662 JSON decoder date-converter is overeager (from [17da45b789e0a2581eae6e6b2b1ae8d2b98e0f5d]) Fix JSO...
- 1662 JSON decoder date-converter is overeager (from [b1530545d259c144770bd8fd7881cb16160c0afc]) Fix JSO...