• Login/Register
  • Section: Internet /Tuesday 14th October 2014


    Search β):

    * JSON *

    JavaScript Object Notation


    (Wikipedia) - JSON For similarly named people, see J Son (disambiguation). JSON Filename extension Internet media type Uniform Type Identifier (UTI) Type of format Extended from Standard Website
    Data interchange
    RFC 7159, ECMA-404



    The JSON format was originally specified by Douglas Crockford. It is currently described by two competing standards, RFC 7159 and ECMA-404. The ECMA standard is minimal, describing only the allowed grammar syntax, whereas the RFC also provides some semantic and security considerations. The official Internet media type for JSON is application/json. The JSON filename extension is .json.



    Douglas Crockford was the first to specify and popularize the JSON format. JSON grew out of a perceived need for stateful, real-time server-to-browser communication without using browser plugins such as Flash or Java applets, which were the dominant method at the time.

    The acronym JSON was coined at State Software Inc., a company co-founded by Douglas Crockford, Chip Morningstar and Robert F. Napiltonia, starting in April 2001, and funded by Tesla Ventures. When State was founded in early 2001 by six former employees of Communities.com, they agreed to build a system that used standard browser capabilities and provided an abstraction layer for Web developers to create stateful Web applications that had a persistent duplex connection to a Web server by holding the two HTTP connections open and recycling them before standard browser time-outs if no further data were exchanged. The idea for the State Application Framework was developed by Chip Morningstar at State Software. It was used in a project at Communities.com for Cartoon Network, which used a plug-in with a proprietary messaging format to manipulate DHTML elements (this system is also owned by 3DO). Upon discovery of early Ajax capabilities, digiGroups, Noosh, and others used frames to pass information into the user browsers'' visual field without refreshing a Web application''s visual context, realizing real-time rich Web applications using only the standard HTTP, HTML and JavaScript capabilities of Netscape 4.0.5+ and IE 5+. Douglas Crockford then found that JavaScript could be used as an object-based messaging format for such a system. The system was sold to Sun Microsystems, Amazon.com and EDS. The JSON.org Web site was launched in 2002. In December 2005, Yahoo! began offering some of its Web services in JSON. Google started offering JSON feeds for its GData web protocol in December 2006.

    Although JSON was originally based on a non-strict subset of the JavaScript scripting language (specifically, Standard ECMA-262 3rd Edition—December 1999) and is commonly used with that language, it is a language-independent data format. Code for parsing and generating JSON data is readily available for a large variety of programming languages. JSON''s Web site provides a comprehensive listing of existing JSON libraries, organized by language.

    Though JSON is commonly perceived as being a subset of JavaScript and ECMAScript, it allows some unescaped characters in strings that are illegal in JavaScript and ECMAScript strings.

    A typical mashup fetches JSON-format data from several different web servers using an Open API.

    Data types, syntax and example

    JSON''s basic types are:

    JSON generally ignores any whitespace around or between syntactic elements (values and punctuation, but not within a string value). However JSON only recognizes four specific whitespace characters: the space, horizontal tab, line feed, and carriage return. JSON does not provide or allow any sort of comment syntax.

    Early versions of JSON (such as specified by RFC 4627) required that a valid JSON "document" must consist of only an object or an array type—though they could contain other types within them. This restriction was relaxed starting with RFC 7158, so that a JSON document may consist entirely of any possible JSON typed value.

    The following example shows a possible JSON representation describing a person.

    { "firstName": "John", "lastName": "Smith", "isAlive": true, "age": 25, "height_cm": 167.6, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021-3100" }, "phoneNumbers": , "children": , "spouse": null }Data portability issues

    Despite the widespread belief that JSON is a strict subset of JavaScript, this is not the case. Specifically, JSON allows the Unicode line terminators U+2028 line separator and U+2029 paragraph separator to appear unescaped in quoted strings, while JavaScript does not. This is a consequence of JSON disallowing only "control characters". For maximum portability these characters should be backslash-escaped. This subtlety is important when generating JSONP.

    JSON permits including the null character U+0000 <control-0000> in a string as long as it is escaped (with "\u0000"). However, this may cause problems with some JSON implementations, especially those based on the C language.

    JSON documents may be, and often are, encoded in UTF-8, which supports the full Unicode character set. This allows even characters outside the BMP (U+10000 to U+10FFFF). However, if escaped those characters must be written using surrogate pairs, a detail missed by some JSON parsers. This is similar to how the UTF-16 encoding works. For example, to include the Emoji character U+1F602

    Tags:Ajax, Amazon, Data, Google, HTML, HTTP, Internet, JSON, Java, Netscape, New York, Sun, Tesla, Web application, Web server, Website, Wikipedia, XML, Yahoo

    Add definition or comments on JSON

    Your Name / Alias:
    Definition / Comments
    neutral points of view
    Source / SEO Backlink:
    Anti-Spam Check
    Enter text above
    Upon approval, your definition will be listed under: JSON

    Happy Summer Sale

    Copyright @ 2004-2016 fouman.com All Rights Iranian