Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#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:


json2.js and json2.min.js were sync'ed from the official GitHub repo:

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)

json.patch (10.4 KB) - added by mgibbs189 7 years ago.
26913-json2-update.patch (11.0 KB) - added by chriscct7 6 years ago.

Download all attachments as: .zip

Change History (9)

7 years ago

#1 @mgibbs189
7 years ago

  • Keywords has-patch dev-feedback added

#2 @klihelp
7 years ago

Have a look at the 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.

Last edited 7 years ago by klihelp (previous) (diff)

#3 @chriscct7
6 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.

#4 @chriscct7
6 years ago

  • Keywords commit added; needs-codex removed

#5 @DrewAPicture
6 years ago

  • Owner changed from chriscct7 to SergeyBiryukov

#6 @wonderboymusic
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 34863:

External Libraries: update json2.js to the 2015-05-03 version. Crockford does not tag releases: https://github.com/douglascrockford/JSON-js/commits/master

Props mgibbs189, chriscct7.
Fixes #26913.

#7 @ocean90
6 years ago

In 34869:

Script Loader: Update version of json2.js after [34863].

See #26913.

Note: See TracTickets for help on using tickets.