Opened 12 years ago
Closed 12 years ago
#5975 closed enhancement (wontfix)
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.
Change History (2)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
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.