jueves, 25 de septiembre de 2014

El OBJETO JSON DE LOS NAVEGADORES

All modern browsers support native JSON encoding/decoding (Internet Explorer 8+, Firefox 3.1+, Safari 4+, and Chrome 3+). Basically, JSON.parse(str) will parse the JSON string (aunque puede parsear directamente null,true,false, numeros)  in str and return an object, andJSON.stringify(obj) will return the JSON representation of the object obj
http://stackoverflow.com/questions/891299/browser-native-json-support-window-json
----------------------
This article covers the ECMAScript 5 compliant native JSON object added in Gecko 1.9.1.  For basic information on using JSON in previous versions of Firefox, see JSON.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON
-----------------------
JSON (JavaScript Object Notation) is a data-interchange format.  It closely resembles a subset of JavaScript syntax, although it is not a strict subset. (See JSON in the JavaScript Reference for full details.)  It is useful when writing any kind of JavaScript-based application, including websites and browser extensions.  For example, you might store user information in JSON format in a cookie, or you might store extension preferences in JSON in a string-valued browser preference.
JSON is capable of representing numbers, booleans, strings, null, and arrays (ordered sequences of values) and objects (string-value mappings) composed of these values (or of other arrays and objects).  It doesn't natively represent more complex data types like functions, regular expressions, dates, and so on.  (Date objects by default serialize as a string containing the date in ISO format, so while they don't round-trip, the information isn't completely lost.)  If you need to preserve such values, you can transform values as they are serialized, or prior to deserialization, to enable JSON to represent additional data types.

No hay comentarios:

Publicar un comentario