#26913 closed enhancement (fixed)
Update json2.js
Reported by: | mgibbs189 | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | External Libraries | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
json2.js and json2.min.js were sync'ed from the official GitHub repo:
https://github.com/douglascrockford/JSON-js
The most noticeable difference is a check to ensure that JSON is an object. There's also readability improvements to some of the ternary operators.
Attachments (2)
Change History (9)
#3
@
9 years ago
- Keywords needs-codex added; dev-feedback removed
- Milestone changed from Awaiting Review to 4.4
- Owner set to chriscct7
- Status changed from new to assigned
Updates the earlier patch file with the latest copy of json2.js.
Moving to json3 is off-topic for the ticket about updating the existing library. Discussions about moving to a new library, like JSON3, should happen on their own ticket.
There's a couple open prs for JSON2 that should be tracked in case they get merged before the 4.4 cycle ends.
Note: See
TracTickets for help on using
tickets.
Have a look at the JSON3:
https://github.com/bestiejs/json3
--
Info on HTML5Please - http://html5please.com/#json
JSON 3 is a polyfill compatible with nearly all JavaScript platforms. It is a drop-in replacement for JSON 2 that uses feature tests to detect broken and incomplete native JSON implementations, supports asynchronous module loaders and has-aware optimizers, and is built to specification standards.
JSON 2 is an older, alternative polyfill by Douglas Crockford.