Side navigation
#5975 closed enhancement (wontfix)
Opened January 28, 2010 09:23PM UTC
Closed January 29, 2010 02:13PM UTC
Set Option for parseJSON to use JSON or Function
Reported by: | indianajones | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4.2 |
Component: | ajax | Version: | 1.4.1 |
Keywords: | parseJSON,option | Cc: | |
Blocked by: | Blocking: |
Description
Expose a setting which allows parseJSON to either use window.JSON (if available) or not. This would eliminate a problem with the generation of JSON objects that contain dates.
For instance, if we define the value for a date such as {"birthday": new Date(1262318400000)}" this is not a 'pure' JSON object and thus fails using the window.JSON call but will work as a javascript evaluation or declaration.
This would be a very small change and would eliminate many additional javascript calls required when working with newly created objects to check for the presences of dates.
Attachments (0)
Change History (2)
Changed January 29, 2010 01:35AM UTC by comment:1
Changed January 29, 2010 02:13PM UTC by comment:2
resolution: | → wontfix |
---|---|
status: | new → closed |
This wouldn't do anything since we pre-check the JSON string to see if it's valid - and what you have there isn't valid, it would throw an error regardless. This isn't something that we're likely to change.
As an alternative, consider using JSONP or fetching script.