Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8425 (reopened defect)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Json 'decode' method does handle alternating quote types

Reported by: canadaduane Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveSupport Version: edge
Severity: normal Keywords:
Cc:

Description

Currently, the Json decoder does not parse the following:

  {"title": "That's great!"}

The above will fail because the single quote inside the double quotes is taken to mean “the start of a new single-quoted string” rather than “a character inside the double-quoted string.”

Attachments

json_decode_alternating_quote_types.diff (0.6 kB) - added by canadaduane on 05/21/07 21:00:59.
json_decode_alternating_quote_types_with_test.diff (1.0 kB) - added by deepblue on 05/31/07 06:17:33.
I added a unit test for this case.

Change History

05/21/07 21:00:59 changed by canadaduane

  • attachment json_decode_alternating_quote_types.diff added.

05/22/07 17:48:26 changed by kevinclark

  • status changed from new to closed.
  • resolution set to untested.

Looks good. Add a unit test.

05/31/07 06:17:33 changed by deepblue

  • attachment json_decode_alternating_quote_types_with_test.diff added.

I added a unit test for this case.

05/31/07 06:19:19 changed by deepblue

  • status changed from closed to reopened.
  • resolution deleted.

Please check this again.