[wp-trac] [WordPress Trac] #16669: JSON2 update

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 27 20:57:40 UTC 2011


#16669: JSON2 update
-----------------------------------+------------------------------
 Reporter:  niallkennedy           |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  External Libraries     |     Version:
 Severity:  minor                  |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------------------

Comment (by niallkennedy):

 The JSON2 library is a JavaScript library to match the ECMAScript 5
 compliant native JSON object included in most modern browsers.

 If a piece of JavaScript code would like to interpret a string as a
 JavaScript object it can pass the string to JSON.parse. A JavaScript
 object may be converted into a string through the JSON.stringify function.

 See also:
  * [http://www.ecma-international.org/publications/standards/Ecma-262.htm
 ECMA 262] sections 15.12.2 (parse) and 15.12.3 (stringify).
  * [https://developer.mozilla.org/En/Using_JSON_in_Firefox Using Native
 JSON in the Mozilla Developer Center].

 JavaScript executes on the client-side; it is separate from PHP functions
 [http://www.php.net/manual/en/function.json-decode.php json_decode] and
 [http://www.php.net/manual/en/function.json-encode.php json_encode].

 || '''Language''' || '''string to object''' || '''object to string''' ||
 || JavaScript || JSON.parse() || JSON.stringify() ||
 || PHP || json_decode() || json_encode() ||

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16669#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list