You are on page 1of 10

JSON

Json redirects here. For people with similar names,


see J Son.

In computing, JavaScript Object Notation or JSON


(/desn/ JAY-sn),[1] is an open-standard le format that
uses human-readable text to transmit data objects consist-
ing of attributevalue pairs and array data types (or any
other serializable value). It is a very common data for-
mat used for asynchronous browser/server communica-
tion, including as a replacement for XML in some AJAX-
style systems.[2]
JSON is a language-independent data format. It was de-
rived from JavaScript, but as of 2017 many programming
languages include code to generate and parse JSON-
format data. The ocial Internet media type for JSON is
application/json. JSON lenames use the extension .json.
Douglas Crockford originally specied the JSON format
in the early 2000s; two competing standards, RFC 7159
and ECMA-404, dened it in 2013. The ECMA standard
describes only the allowed syntax, whereas the RFC cov-
ers some security and interoperability considerations.[3]
A restricted prole of JSON, known as I-JSON (short
for Internet JSON), seeks to overcome some of the in-
teroperability problems with JSON. It is dened in RFC Douglas Crockford rst specied JSON. Image from 2007.
7493 .[4]
had a round-table discussion and voted whether to call the
data format JSML or JSON, as well as under what license
1 History type to make it available. Crockford, being inspired by
the words of then President Bush, should also be cred-
JSON grew out of a need for stateful, real-time server-to- ited with coming up with the evil-doers JSON license
browser communication protocol without using browser (The Software shall be used for Good, not Evil.) in or-
plugins such as Flash or Java applets, the dominant meth- der to open-source the JSON libraries, but force (troll)
ods used in the early 2000s. corporate lawyers, or those who are overly pedantic, to
Douglas Crockford rst specied[5] and popularized the seek to pay for a license from State. Morningstar de-
JSON format. The acronym originated at State Software veloped the idea for the State Application Framework at
(originally named Veil Networks, Inc.), a company co- State Software.[6][7] On the other hand, this clause led to
founded by Crockford, Randy Farmer (left to work at license compatibility problems of the JSON license with
3DO), Greg Macdonald, Chip Morningstar, Robert F. other open-source licenses.[8]
Napiltonia and Dominik Zynis in March 2001. State A precursor to the JSON libraries was used in a childrens
Software was funded by Tesla Ventures with $1.8 Mil- digital asset trading game project named Cartoon Orbit at
lion in October 2011, and attempted to trademark the Communities.com (the State co-founders had all worked
word State. The co-founders agreed to build a sys- at this company previously) for Cartoon Network, which
tem that used standard browser capabilities and provided used a browser side plug-in with a proprietary messag-
an abstraction layer for Web developers to create state- ing format to manipulate DHTML elements (this sys-
ful Web applications that had a persistent duplex connec- tem is also owned by 3DO). Upon discovery of early
tion to a Web server by holding two HTTP connections Ajax capabilities, digiGroups, Noosh, and others used
open and recycling them before standard browser time- frames to pass information into the user browsers visual
outs if no further data were exchanged. The co-founders eld without refreshing a Web applications visual con-

1
2 2 DATA TYPES, SYNTAX AND EXAMPLE

text, realizing real-time rich Web applications using only that each key is unique within an object. Objects
the standard HTTP, HTML and JavaScript capabilities of are delimited with curly brackets and use commas
Netscape 4.0.5+ and IE 5+. Crockford then found that to separate each pair, while within each pair the
JavaScript could be used as an object-based messaging colon ':' character separates the key or name from
format for such a system. The system was sold to Sun Mi- its value.
crosystems, Amazon.com and EDS. The JSON.org Web
site was launched in 2002. In December 2005, Yahoo! null: An empty value, using the word null
began oering some of its Web services in JSON.[9]
JSON was originally intended to be a subset of the Limited whitespace is allowed and ignored around or be-
JavaScript scripting language (specically, Standard tween syntactic elements (values and punctuation, but not
ECMA262 3rd EditionDecember 1999[10] ) and is within a string value). Only four specic characters are
commonly used with Javascript, but it is a language- considered whitespace for this purpose: space, horizon-
independent data format. Code for parsing and generat- tal tab, line feed, and carriage return. In particular, the
ing JSON data is readily available in many programming byte order mark must not be generated by a conforming
languages. JSONs Web site lists JSON libraries by lan- implementation (though it may be accepted when parsing
guage. JSON). JSON does not provide any syntax for comments.
Though JSON was originally advertised and believed to Early versions of JSON (such as specied by RFC 4627)
be a strict subset of JavaScript and ECMAScript,[11] it in- required that a valid JSON document must consist of
advertently allows some unescaped characters in strings only an object or an array type, which could contain other
that are illegal in JavaScript and ECMAScript strings. types within them.
See Data portability issues below.
JSON itself became an ECMA international standard in 2.1 Example
2013 as the ECMA-404 standard.[12] In the same year
RFC 7158 used ECMA-404 as reference. In 2014 RFC
The following example shows a possible JSON represen-
7159 became the main reference for JSONs internet uses
tation describing a person.
(ex. MIME application/json), and obsoletes RFC 4627
and RFC 7158 (but preserving ECMA-262 and ECMA- { rstName": John, lastName": Smith, isAlive":
404 as main references). true, age": 25, address": { streetAddress": 21 2nd
Street, city": New York, state": NY, postal-
Code": 10021-3100 }, phoneNumbers": [ { type":
2 Data types, syntax and example home, number": 212 555-1234 }, { type": of-
ce, number": 646 555-4567 }, { type": mobile,
number": 123 456-7890 } ], children": [], spouse":
JSONs basic data types are: null }

Number: a signed decimal number that may contain


a fractional part and may use exponential E nota-
tion, but cannot include non-numbers like NaN. The 2.2 Data portability issues
format makes no distinction between integer and
oating-point. JavaScript uses a double-precision Although Douglas Crockford originally claimed that
oating-point format for all its numeric values, but JSON is a strict subset of JavaScript, his specication
other languages implementing JSON may encode actually allows valid JSON documents that are invalid
numbers dierently. JavaScript. Specically, JSON allows the Unicode line
terminators U+2028 LINE SEPARATOR and U+2029
String: a sequence of zero or more Unicode char-
PARAGRAPH SEPARATOR to appear unescaped in
acters. Strings are delimited with double-quotation
quoted strings, while JavaScript does not.[14] This is a
marks and support a backslash escaping syntax.
consequence of JSON disallowing only control charac-
Boolean: either of the values true or false ters. For maximum portability, these characters should
be backslash-escaped. This subtlety is important when
Array: an ordered list of zero or more values, generating JSONP.
each of which may be of any type. Arrays
use square bracket notation with elements being JSON documents can be encoded in UTF-8,[13] UTF-16 or
comma-separated. UTF-32, the default encoding being UTF-8 (I-JSON
only supports UTF-8). These encodings support the full
Object: an unordered collection of name/value pairs Unicode character set, including those characters outside
where the names (also called keys) are strings. Since the Basic Multilingual Plane (U+10000 to U+10FFFF).
objects are intended to represent associative ar- However, if escaped, those characters must be written
rays,[12] it is recommended, though not required,[13] using UTF-16 surrogate pairs, a detail missed by some
3

JSON parsers. For example, to include the Emoji charac- with this type of conversion.
ter U+1F602 FACE WITH TEARS OF JOY in JSON:
{ face": " " } // or { face": "\uD83D\uDE02 }
3 Schema and metadata
Numbers in JSON are agnostic with regard to their repre-
sentation within programming languages. No dierenti- 3.1 JSON Schema
ation is made between an integer and oating-point value:
some implementations may treat 42, 42.0, and 4.2E+1 as JSON Schema[18] species a JSON-based format to de-
the same number while others may not. Furthermore, no ne the structure of JSON data for validation, documen-
requirements are made regarding implementation issues tation, and interaction control. It provides a contract for
such as overow, underow, loss of precision, or round- the JSON data required by a given application, and how
ing. Additionally, JSON says nothing about the treat- that data can be modied.
ment of signed zeros: whether 0.0 is distinct from 0.0.
JSON Schema is based on the concepts from XML
Most implementations that use the IEEE 754 oating-
Schema (XSD), but is JSON-based. As in XSD, the same
point standard, including JavaScript, preserve signed ze-
serialization/deserialization tools can be used both for the
ros; but not all JSON implementations may do so.
schema and data; and is self-describing. It is described in
an Internet Draft currently in its 5th version, which was
2.3 Using JSON in JavaScript released on October 13, 2016[19] (version 4 had expired
on August 4, 2013,[20] leading to a lapse of more than 3
Since JSON was derived from JavaScript and its syntax years). There are several validators [21]
available for dier-
is (mostly) a subset of the language, it is possible to use ent programming languages, each with varying levels
the JavaScript eval() function to parse JSON data. Due of conformance.
to the issue with parsing of Unicode line terminators dis- There is no standard le extension, but some have sug-
cussed in the preceding section, the eval function needs gested .schema.json.[22]
to perform a string replacement.[14]
Example JSON Schema (draft 4):
var p = eval('(' + json_string.replace(/\u2028/g,'\\u2028').replace(/\u2029/g,
{ "$schema": "http://json-schema.org/schema#", title":
'\\u2029') + ')');
Product, type": object, required": ["id, name,
price"], properties": { id": { type": number,
This is unsafe if the string is untrusted. Instead, a JSON description": Product identier }, name": { type":
parser library or JavaScripts native JSON support should string, description": Name of the product }, price":
be used for reading and writing JSON. { type": number, minimum": 0 }, tags": { type":
var p = JSON.parse(json_string); array, items": { type": string } }, stock": {
type": object, properties": { warehouse": { type":
number }, retail": { type": number } } } } }
A correctly implemented JSON parser only accepts valid
JSON, preventing potentially malicious code from being
inadvertently executed. The JSON Schema above can be used to test the validity
of the JSON code below:
Since 2010, web browsers such as Firefox and Internet
Explorer have included support for parsing JSON. As na- { id": 1, name": Foo, price": 123, tags": [ Bar,
tive browser support is more ecient and secure than Eek ], stock": { warehouse": 300, retail": 20 } }
eval(), native JSON support is included in Edition 5 of
the ECMAScript standard.[15]

4 MIME type
2.4 Unsupported native data types
JavaScript syntax denes several native data types that The ocial MIME type for JSON text is
are not included in the JSON standard:[13] Map, Set, application/json,[23] and most modern implemen-
Date, Error, Regular Expression, Function, Promise, and tations have adopted this.
undened.[note 1] These JavaScript data types must be rep- The (unocial) MIME type text/json or the content-
resented by some other data format, with the programs type text/javascript also get legacy support by many
on both ends agreeing on how to convert between the service providers, browsers, servers, web applications,
types. As of 2011, there are some de facto standards, libraries, frameworks, and APIs. Notable exam-
e.g., converting from Date to String, but none universally ples include the Google Search API,[24] Yahoo!,[24][25]
recognized.[16][17] Other languages may have a dierent Flickr,[24] Facebook API,[26] Lift framework,[27] Dojo
set of native types that must be serialized carefully to deal Toolkit 0.4,[28] etc.
4 6 SECURITY CONSIDERATIONS

5 Applications function, which is described below.

5.1 JSON-RPC 6.1 JavaScript eval()


JSON-RPC is a remote procedure call (RPC) protocol
Some developers mistakenly believe that JSON-
built on JSON, as a replacement for XML-RPC or SOAP.
formatted text is also syntactically legal JavaScript code
It is a simple protocol that denes only a handful of data
though certain valid JSON strings are actually not valid
types and commands. JSON-RPC lets a system send no-
JavaScript code.[29] Because of that, they believe an easy
tications (information to the server that does not require
way for a JavaScript program to parse JSON-formatted
a response) and multiple calls to the server that can be
data would be to use the built-in JavaScript eval()
answered out of order. Example of a JSON-RPC 2.0 re-
function, which was designed to evaluate JavaScript
quest and response using positional parameters.
expressions. Rather than using a JSON-specic parser,
--> {"jsonrpc": 2.0, method": subtract, params": the JavaScript interpreter itself is thus used to execute
[42, 23], id": 1} <-- {"jsonrpc": 2.0, result": 19, the JSON data, producing native JavaScript objects.
id": 1} This technique is risky, however, if there is any chance
that the JSON data might contain arbitrary JavaScript
code, which would then be executed also.
Unless precautions are taken to validate the data rst,
5.2 AJAJ the eval technique is subject to security vulnerabilities
when the data and the entire JavaScript environment are
Asynchronous JavaScript and JSON (or AJAJ) refers to not within the control of a single trusted source. For
the same dynamic web page methodology as Ajax, but example, if the data is itself not trusted, it is subject
instead of XML, JSON is the data format. AJAJ is a to malicious JavaScript code injection attacks. Such
web development technique that provides for the ability breaches of trust also can create vulnerabilities for data
of a webpage to request new data after it has loaded into theft, authentication forgery, and other potential misuses
the web browser. Typically it renders new data from the of data and resources.
server in response to user actions on that webpage. For
example, what the user types into a search box, client- The RFC that denes JSON (RFC 4627) suggests using
side code then sends to the server, which immediately re- the following code to validate JSON using a regular ex-
sponds with a drop-down list of matching database items. pression before evaluating it (the variable 'text' is the input
JSON):[30]
The following JavaScript code is an example of a client
using XMLHttpRequest to request data in JSON format var my_JSON_object = !(/[^,:{}\[\]0-9.\-+Eaenr-u
from a server. (The server-side programming is omitted; \n\r\t]/.test( text.replace(/"(\\.|[^"\\])*"/g, ''))) &&
it must be set up to service requests to the url containing eval('(' + text + ')');
a JSON-formatted string.)
var my_JSON_object; var http_request = new However, this validation is now known to be
[31]
XMLHttpRequest(); http_request.open(GET, insucient.
url, true); http_request.responseType = json"; A new function, JSON.parse(), was thus developed as
http_request.onreadystatechange = function () { var done a safer alternative to eval(). It is specically intended
= 4, ok = 200; if (http_request.readyState === done to process JSON data and not JavaScript. It was origi-
&& http_request.status === ok) { my_JSON_object = nally planned for inclusion in the Fourth Edition of the
http_request.response; } }; http_request.send(null); ECMAScript standard,[32] but this did not occur. It was
rst added to the Fifth Edition,[33] and is now supported
by the major browsers given below. For older ones, a
compatible JavaScript library is available at JSON.org.
6 Security considerations An additional issue when parsing JSON using the eval()
function is that there are some Unicode characters that
JSON is intended as a data serialization format. However, are valid in JSON strings but invalid in JavaScript, so ad-
its design as a non-strict subset of the JavaScript scripting ditional escaping may be needed in some cases.[29]
language poses several security concerns. These concerns
center on the use of a JavaScript interpreter to execute
JSON text dynamically as embedded JavaScript. This 6.2 Native encoding and decoding in
exposes a program to errant or malicious scripts. This browsers
is a serious issue when dealing with data retrieved from
the Internet. This easy and popular but risky technique Web browsers now have or plan to have native JSON en-
exploits JSONs compatibility with the JavaScript eval() coding and decoding. This eliminates the eval() security
8.1 YAML 5

problem above, and can increase performance compared 8.1 YAML


to the JavaScript libraries commonly used before. As of
June 2009, the following browsers have native JSON sup- YAML version 1.2 is a superset of JSON; prior versions
port, via JSON.parse() and JSON.stringify(): were not strictly compatible. For example, escaping a
slash (/) with a backslash (\) is valid in JSON, but was not
Mozilla Firefox 3.5+[34] valid in YAML. (This is common practice when injecting
Microsoft Internet Explorer 8+ [35] JSON into HTML to protect against cross-site scripting
attacks.) Nonetheless, many YAML parsers can natively
Opera 10.5+[36] parse the output from many JSON encoders.[51]
WebKit-based browsers (Apple Safari)[37]
Blink-based browsers (e.g. Google Chrome, Opera) 8.2 XML
At least ve popular JavaScript libraries have committed XML has been used to describe structured data and to
to use native JSON, if available: serialize objects. Various XML-based protocols exist to
represent the same kind of data structures as JSON for
YUI Library[38]
the same kind of data interchange purposes. Data can be
Prototype[39] encoded in XML several ways. The most expansive form
using tag pairs results in a much larger representation than
jQuery[40]
JSON, but if data is stored in attributes and 'short tag'
Dojo Toolkit[41] form where the closing tag is replaced with '/>', the rep-
resentation is often about the same size as JSON or just a
MooTools [42]
little larger. If the data is compressed using an algorithm
like gzip, there is little dierence because compression is
6.3 Implementation-specic issues good at saving space when a pattern is repeated.
XML also has the concept of schema. This permits
Various JSON parser implementations have suered strong typing, user-dened types, predened tags, and
from denial-of-service attack and mass assignment vul- formal structure, allowing for formal validation of an
nerability.[43][44] XML stream in a portable way. There is, however, an
IETF draft proposal for a schema system for JSON.[52]
XML supports comments, but JSON does not.[53]
7 Object references
The JSON standard does not support object references, 8.3 Samples
but an IETF draft standard for JSON-based object
references exists.[45] The Dojo Toolkit supports ob- 8.3.1 JSON sample
ject references using standard JSON; specically, the
dojox.json.ref module provides support for several { rstName": John, lastName": Smith, age": 25,
forms of referencing including circular, multiple, inter- address": { streetAddress": 21 2nd Street, city":
message, and lazy referencing.[46][47][48] Alternatively, New York, state": NY, postalCode": 10021
non-standard solutions exist such as the use of Mozilla }, phoneNumber": [ { type": home, number":
JavaScript Sharp Variables. However this functionality 212 555-1234 }, { type": fax, number": 646
became obsolete with JavaScript 1.8.5 and was removed 555-4567 } ], gender": { type": male } }
in Firefox version 12.[49]
Both of the following examples carry the same kind of
information as the JSON example above in dierent ways.
8 Comparison with other formats
See also: Comparison of data serialization formats 8.3.2 YAML sample

JSON is promoted as a low-overhead alternative to XML The JSON code above is also entirely valid YAML.
as both of these formats have widespread support for cre- YAML also oers an alternative syntax intended to be
ation, reading, and decoding in the real-world situations more human-accessible by replacing nested delimiters
where they are commonly used.[50] Apart from XML, like {}, [], and " marks with o-side indentation.[51]
examples could include OGDL, YAML and CSV. Also, --- rstName: John lastName: Smith age: 25 address:
Google Protocol Buers can ll this role, although it is streetAddress: 21 2nd Street city: New York state: NY
not a data interchange language. postalCode: '10021' phoneNumber: - type: home num-
6 10 NOTES

ber: 212 555-1234 - type: fax number: 646 555-4567 JSON-RPC


gender: type: male SOAPjra hybrid of SOAP and JR (JSON-
RPC)
JsonML
8.3.3 XML samples
Binary encodings for JSON
<person> <rstName>John</rstName> <last- BSON
Name>Smith</lastName> <age>25</age> <ad-
dress> <streetAddress>21 2nd Street</streetAddress> MessagePack
<city>New York</city> <state>NY</state> <postal- Smile
Code>10021</postalCode> </address> <phoneNum- UBJSON
ber> <type>home</type> <number>212 555-
1234</number> </phoneNumber> <phoneNumber> EXI4JSON (EXI for JSON)representation
<type>fax</type> <number>646 555-4567</number> by means of the Ecient XML Interchange
</phoneNumber> <gender> <type>male</type> </gen- (EXI) standard
der> </person> Implementations:

The properties can also be serialized using attributes in- Jayrockan open source implementation of
stead of tags: JSON for the .NET Framework.
Ember data server implementations for PHP,
<person rstName="John lastName="Smith
Node.js, Ruby, Python, Go, .NET and Java.
age="25"> <address streetAddress="21 2nd Street
city="New York state="NY postalCode="10021 Other
/> <phoneNumber type="home number="212 555-
1234"/> <phoneNumber type="fax number="646 Comparison of data serialization formats
555-4567"/> <gender type="male"/> </person> Jq (programming language)

The XML encoding may therefore be comparable in


length to the equivalent JSON encoding. A wide range of 10 Notes
XML processing technologies exist, from the Document
Object Model to XPath and XSLT. XML can also be [1] The undened type was left out of the JSON standard, and
styled for immediate display using CSS. XHTML is a one nds suggestions that null be used instead. In fact, the
form of XML so that elements can be passed in this form current standard says that for a sparse array such as:
ready for direct insertion into webpages using client-side var v = [0]; v[3] = 3;
scripting. which behaves in JavaScript as if it were:
var vx = [0, undened, undened, 3];
with the undened entries being only implicit rather than
explicit, should translate to JSON as if it were:
9 See also var vx = [0, null, null, 3];
with explicit null llers for the undened entries. Fur-
JSON Streaming thermore, in JavaScript {a: undened} often behaves the
same as {}. Both translate as "{}" in JSON. However
Other formats undened as an explicit property value does have use in
JavaScript inheritance situations such as:
HOCONHuman-Optimized Cong Object
var x = {a: 1}; var xi = Object.create(x); xi.a = undened;
Notation, a superset of JSON where the inheritance of xs property a is overridden in xi
YAMLAnother datastorage format that is a and makes it pretty much behave as if nothing was inher-
superset of JSON[54] ited. JSON.stringify itself ignores inherited values - it only
S-expressionthe comparable LISP format translates the enumerable own properties as given by Ob-
ject.keys(y). The default stringication, while not encod-
for trees as text.
ing inheritance, can (except for undened values) encode
JSONPJSON with Padding, a pattern of enough of an object to reconstruct it in an environment
usage commonly employed when retrieving that knows what inheritance it should have. To encode
JSON across domains JavaScript objects that contain explicit undened values
GeoJSONan open format for encoding a va- a convention for representing undened must be estab-
lished, such as mapping it to the string UNDEFINED.
riety of geographic data structures
One can then pass JSON.stringify the optional replacer ar-
JSON-LDJavaScript Object Notation for gument to translate with this convention:
Linked Data, currently a W3C Recommenda- var y = {a: undened}; var ys = JSON.stringify(y, func-
tion tion (k, v){return (v === undened) ? UNDEFINED :
7

v}); [17] Tales from the Evil Empire - Dates and JSON. asp.net.
Converting this JSON back into JavaScript is not as Retrieved 13 September 2015.
straightforward. While JSON.parse can take an optional
reviver argument that is, essentially, the inverse of a re- [18] JSON Schema and Hyper-Schema. json-schema.org.
placer, it can't be used in this situation. If that function Retrieved 13 September 2015.
returns undened, the JSON.parse logic interprets this to
[19] draft-wright-json-schema-00 - JSON Schema: A Me-
mean to not dene a property rather than dene one with
dia Type for Describing JSON Documents. json-
a undened value. Instead one has to explicitly post pro-
schema.org/. Retrieved 17 February 2017.
cess the result from JSON.parse replacing each UNDE-
FINED with undened. [20] draft-zyp-json-schema-04 - JSON Schema: core de-
nitions and terminology. ietf.org. Retrieved 17 March
2016.
11 References [21] JSON Schema Software. json-schema.org. Retrieved
13 September 2015.
[1] Doug Crockford Google Tech Talks: JavaScript: The
Good Parts"". 7 February 2009. [22] http://stackoverflow.com/a/10507586/287948

[2] A Modern Reintroduction To AJAX. Retrieved 12 [23] Media Types. iana.org. Retrieved 13 September 2015.
April 2017.
[24] Handle application/json & text/json by benschwarz Pull
[3] Bray, Tim. JSON Redux AKA RFC7159. Ongoing. Request #2 mislav/faraday-stack. GitHub. Retrieved 13
Retrieved 16 March 2014. September 2015.

[4] Bray, Tim (ed.), The I-JSON Message Format, Internet En- [25] Yahoo!, JavaScript, and JSON. ProgrammableWeb.
gineering Task Force (IETF), RFC 7493 Retrieved 13 September 2015.

[5] Douglas Crockford The JSON Saga. YouTube. 28 [26] Make JSON requests allow text/javascript content
August 2011. Retrieved 23 September 2016. by jakeboxer Pull Request #148 AFNetwork-
ing/AFNetworking. GitHub. Retrieved 13 September
[6] Chip Morningstar Biography. n.d. 2015.

[7] State Software Breaks Through Web App Development [27] lift/Req.scala at master lift/lift GitHub. GitHub. Re-
Barrier With State Application Framework: Software trieved 13 September 2015.
Lets Developers Create Truly Interactive Applications;
Reduces Costs, Development Time and Improves User [28] BrowserIO.js in legacy/branches/0.4/src/io Dojo
Experience. PR Newswire. February 12, 2002. Toolkit. dojotoolkit.org. Retrieved 13 September 2015.

[8] Apache and the JSON license on LWN.net by Jake Edge [29] JSON: The JavaScript subset that isn't. Magnus Holm.
(November 30, 2016) Retrieved 16 May 2011.

[9] Yahoo!. Using JSON with Yahoo! Web services. [30] Douglas Crockford (July 2006). IANA Considerations.
Archived from the original on October 11, 2007. Re- The application/json Media Type for JavaScript Object No-
trieved July 3, 2009. tation (JSON). IETF. sec. 6. RFC 4627. https://tools.
ietf.org/html/rfc4627#section-6. Retrieved October 21,
[10] Crockford, Douglas (May 28, 2009). Introducing 2009.
JSON. json.org. Retrieved July 3, 2009.
[31] Stefano Di Paola. Minded Security Blog: Ye Olde
[11] Douglas Crockford (2016-07-10). JSON in JavaScript. Crockford JSON regexp is Bypassable. mindedsecu-
Archived from the original on 2016-07-10. Retrieved rity.com. Retrieved 13 September 2015.
2016-08-13.
[32] Crockford, Douglas (December 6, 2006). JSON: The
[12] The JSON Data Interchange Format (PDF). ECMA Fat-Free Alternative to XML. Retrieved July 3, 2009.
International. October 2013. Retrieved 23 September
2016. [33] ECMAScript Fifth Edition (PDF). Retrieved March 18,
2011.
[13] JSON Web Token (JWT)". IETF. May 2015. Retrieved
23 September 2016. [34] Using Native JSON. June 30, 2009. Retrieved July 3,
2009.
[14] Holm, Magnus (15 May 2011). JSON: The JavaScript
subset that isn't. The timeless repository. Retrieved 23 [35] Barsan, Corneliu (September 10, 2008). Native JSON in
September 2016. IE8. Retrieved July 3, 2009.

[15] Standard ECMA-262. ecma-international.org. Re- [36] Web specications supported in Opera Presto 2.5.
trieved 13 September 2015. March 10, 2010. Retrieved March 29, 2010.

[16] jquery - Format a Microsoft JSON date? - Stack Over- [37] Hunt, Oliver (June 22, 2009). Implement ES 3.1 JSON
ow. stackoverow.com. Retrieved 13 September 2015. object. Retrieved July 3, 2009.
8 12 EXTERNAL LINKS

[38] YUI 2: JSON utility. September 1, 2009. Retrieved


October 22, 2009.

[39] Learn JSON. April 7, 2010. Retrieved April 7, 2010.

[40] Ticket #4429. May 22, 2009. Retrieved July 3, 2009.

[41] Ticket #8111. June 15, 2009. Retrieved July 3, 2009.

[42] Ticket 419. October 11, 2008. Retrieved July 3, 2009.

[43] Denial of Service and Unsafe Object Creation Vulnera-


bility in JSON (CVE-2013-0269)". Retrieved January 5,
2016.

[44] Microsoft .NET Framework JSON Content Processing


Denial of Service Vulnerability. Retrieved January 5,
2016.

[45] Zyp, Kris (September 16, 2012). Bryan, Paul C., ed.
JSON Reference: draft-pbryan-zyp-json-ref-03. Inter-
net Engineering Task Force.

[46] Zyp, Kris. dojox.json.ref. Dojo.

[47] Zyp, Kris (June 17, 2008). JSON referencing in Dojo.


SitePen. Retrieved July 3, 2009.

[48] von Gaza, Tys (Dec 7, 2010). JSON referencing in


jQuery. NUBUNTU. Archived from the original on May
7, 2015. Retrieved Dec 7, 2010.

[49] Sharp variables in JavaScript. Mozilla Developer Net-


work. April 4, 2015. Retrieved 21 April 2012.

[50] JSON: The Fat-Free Alternative to XML. json.org. Re-


trieved 14 March 2011.

[51] YAML Aint Markup Language (YAML) Version


1.2. yaml.org. Retrieved 13 September 2015.

[52] JSON Schema. json-schema.org. Retrieved 2017-04-


10.

[53] Saternos, Casimir (2014). Client-server web apps with


Javascript and Java. p. 45. ISBN 9781449369316.

[54] Oren Ben-Kiki; Clark Evans; Ingy dt Net. YAML Aint


Markup Language (YAML) Version 1.2. Retrieved 29
August 2015.

12 External links
Format home page
The JavaScript Object Notation (JSON) Data Inter-
change Format (RFC 7159)
ECMA-404The JSON Data Interchange Format

CBORA binary encoding for JSON


JSON FormatterOnline JSON formatter.
9

13 Text and image sources, contributors, and licenses


13.1 Text
JSON Source: https://en.wikipedia.org/wiki/JSON?oldid=784229677 Contributors: Damian Yerrick, AxelBoldt, SJK, Mjb, David spector,
Chris Q, Jose Icaza, Nealmcb, Jarekadam, Pnm, Ixfd64, Phoe6, TakuyaMurata, Ronz, Ootachi, Drrwebber, Brettz9, Kragen, Julesd, IMSoP,
JamesReyes, Charles Matthews, Ebruchez, Gutza, Dtgm, Furrykef, LMB, Bevo, AnonMoos, Skaman, RedWolf, Peak, Nurg, Whorvath,
Jvangorp, ClemRutter, Jleedev, Mattaschen, Tea2min, DocWatson42, SamB, DavidCary, Gil Dawson, var Arnfjr Bjarmason, Levin,
Kmote, Ssd, Doekman, Joe Sewell, Cloud200, Rchandra, Pne, Christopherlin, Chowbok, Pgan002, Beland, IGEL, Kaldari, OwenBlacker,
Mjs, Panzi, Wevah, Urhixidur, Frenchwhale, Ultrarob, Genesis, D6, R, RedWordSmith, RossPatterson, Bri, Rich Farmbrough, Mecan-
ismo, Smyth, Jaap~enwiki, TimBray, Dmeranda, Bender235, CanisRufus, Lauciusa, Kwamikagami, Heimy, Nickj, Vipul, Agoode, Nigelj,
A1kmm, Minghong, Wrs1864, Krellis, Gary, Jhertel, Jeltz, Wtmitchell, Lindsay-mclennan, Pediddle, Saxifrage, Brycen, Joshsteiner, Ian
Moody, Simetrical, MartinSpacek, Mindmatrix, Jacobolus, Ruud Koot, Dodiad, Easyas12c, Dah31, Hughcharlesparker, Tom W.M., Ger-
brant, Yonran, RichardWeiss, Demonuk, Charles Iliya Krempeaux, Tlroche, Rjwilmsi, Martin.sweeney, Koavf, Amire80, Sleepyhead81,
FlaBot, Tagith, Mga, Xavier Combelle, Delfuego, Skierpage, Kri, Frappyjohn, 121a0012, Bgwhite, Digitalme, Peterl, Kakurady, YurikBot,
Todd Vierling, RussBot, Andrs Santiago Prez-Bergquist, Fabartus, Markpeak, Dnch, Hydrargyrum, Member, Vladimir Lapacek, Go-
sub, RolandYoung, Colinmcc, Lobwedge, Scs, BMAH07, SixSix, Natkeeran, Falcon9x5, Vlad, Deeday-UK, Alarob, Gslin, SMcCandlish,
Superp, Jereymcmanus, Habbie, Kingboyk, A bit iy, SmackBot, Gamol, Reedy, Maian, Renku, Dylnuge, Mcld, Gilliam, Ohnoitsjamie,
Betacommand, Amux, Unetch, Lawrence Waterhouse, Thumperward, Snori, EncMstr, Jerome Charles Potts, Octahedron80, Cassivs,
CDV, Jdthood, RuudVisser, Frap, Ashawley, Andyparkins, Tlane, MitchellShnier, Cybercobra, Hammer1980, Daniel.Cardenas, John Bent-
ley, Zearin, Nellisks, JorisvS, RichMorin, Gorgalore, Nagle, Penagate, Svippong, Hulmem, 16@r, Konklone, PRRfan, Fangfufu, Mets501,
Demisone, EdC~enwiki, Balrog, Psi, Polyethene, Syberguru, Beefyt, Hu12, Rory O'Kane, Pwforaker, Jason.grossman, Dreftymac, Ivan-
Lanin, Vocaro, Pimlottc, CapitalR, Elharo, Booles, FatalError, Bspahh, Tonyhansen, Washi, SimpleBeep, DanilaKutkevich, Sanspeur,
JamesNK, MichaelRWolf, Marcoshz, Cydebot, Krauss, Larsnostdal, MC10, Peterdjones, Ztolstoy, AndyAnderson, Verdy p, Ebrahim,
Johayek, PKT, Thijs!bot, Jedibob5, Pctopp, Dtgriscom, Supersizefriesjj, Dgies, Nick Number, Robert Ham, Dainis, Joe Schmedley,
Yellowdesk, Kuteni, Durrantm, Deective, MER-C, Lino Mastrodomenico, Chrisdew, Andonic, Magioladitis, MiguelMunoz, Transcen-
dence, Azbarcea, Plperez, Otterfan, Gabrielsroka, Mjohnjoseph, Gwern, DouglasCrockford, Hdt83, Ariel., John Millikin, Zygimantus,
RockMFR, Paranomia, Inimino, Mike.lifeguard, Cpiral, Oliver.hessling, Dispenser, Austin512, RenniePet, NewEnglandYankee, Jainvi-
neet, Potatoswatter, Doug4, Binris, Jefe2000, CWii, Kadnan, AlnoktaBOT, Javy tahu, TXiKiBoT, Oshwah, MEFlora, Alex rosenberg35,
Vipinhari, A4bot, CHForsyth, Anna Lincoln, Econterms, Ttennebkram, Jameswiltshire, Wingedsubmariner, Billinghurst, Andy Dingley,
SQL, Peu, Digita, Sevela.p, AJRobbins, Logan, Saom, Roesser, Happysailor, Flyer22 Reborn, Stean Cline, User5910, AlanUS, Fuddle,
Maxime.Debosschere, Tesi1700, Cems2, Tronic2, Izhaki, ShelleyAdams, ImageRemovalBot, Lockoom, JWilk, TimBunce, Hogstrom,
DragonBot, Senorkaj, Shinkolobwe, Mralokkp, Pot, EhJJ, Arjayay, Tjholowaychuk, SaltyDawg, Aprock, NintendoFan, 1ForTheMoney,
Johnuniq, Joswig, Wineacionado, Nneuman, Mister pink2, XLinkBot, Kwjbot, Vishalmamania, Mifter, Thomasfrank.se, Addbot, Ghet-
toblaster, Tothwolf, AkhtaBot, Scientus, AdeBarkah, Debloper, Cst17, MrOllie, Cowtowncoder, Doniago, Jarble, Prashanthjoshi, Luckas-
bot, Yobot, JackPotte, Bunnyhop11, Jhswalwell, Amirobot, Zzie, The Earwig, Wonder, AnomieBOT, Arjun G. Menon, Rubinbot,
90, Dmartinezc, RicJohnsonIII, Kromped, SunKing2, Materialscientist, RokerHRO, Phistuck, Elninopanza, ArthurBot, Richtaur, Xqbot,
Termininja, Martnym, Robmanson, Nasa-verve, P.srikanta, Ogendarf, Cyberhitesh, VictorPorton, Acka47, Universalss, Krinkle, Fres-
coBot, W Nowicki, Ijabz, Ilovenagpur, Sae1962, Chenopodiaceous, I dream of horses, JirkaKosek, Jandalhandler, Jesus Presley, Ifai,
Jonkerz, Raahmad, Vrenator, Seahorseruler, Bongdentoiac, Caciquer, Neinsun, Phlegat, Hfmanson, Othree, Tuankiet65, Jvenema, Su-
per48paul, Dewritech, GoingBatty, Bosik GN, Tommy2010, AsceticRose, Listmeister, Tschubring, F, DonToto, Chharvey, Derekleungt-
szhei, Ebrambot, Dmpatierno, H3llBot, Glasserc, DougEwell, Ryan Kaldari (WMF), Mount Flatten, Edgar.bonet, Speed.arg, MainFrame,
Mikhail Ryazanov, ClueBot NG, Getify, Jack Greenmaven, Anirudh4444, Shaddim, Koornti, Pdameasap, Jcgoble3, Wezkoh, Frietjes,
EricOP, Widr, Helpful Pixie Bot, Mgamer gd, HMSSolent, WildWeazel, KLBot2, BG19bot, MrForms, VictorEspina, Compfreak7, Dae-
monicky, Dan Bolser, Hg00000, Tianrb, Achowat, Bagel180, BattyBot, Pratyya Ghosh, Cyberbot II, Theoretick, Tomihasa, Wjcw, JYBot,
ThereFOUR, Rezonansowy, Harlanhaskins, Kephir, RapPayne, Thomas Tregner, SFK2, Hmahajan, Jwoodward48wiki, Piotr Jurkiewicz,
Myconix, Nadotesumerogi, Comp.arch, Lovelyme00, Tsuvo, Logikl dk, Manul, FockeWulf FW 190, Robwlakes, Kaendnger, Johnirv-
ing2001, JaconaFrere, Sapper-, Rnjckhpr, VeniVidiVicipedia, Tsaloranta, M.sattler, Unician, HMSLavender, A Great Catholic Person,
DiscantX, Fugitron, Douira100, Kaartic, Mtnorthpoplar, , Tropicalkitty, Lemondoge, Susannahmeyer, Dzilbers, A2VudA, Master
rg, InternetArchiveBot, AlexTugaev72, GreenC bot, Rafagafe, Prahlad balaji, Bender the Bot, CJ2012215061, Librarian 1, Mackiovello,
Weshigbee, Jordinas and Anonymous: 753

13.2 Images
File:Commons-logo.svg Source: https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg License: PD Contributors: ? Origi-
nal artist: ?
File:Douglas_Crockford.jpg Source: https://upload.wikimedia.org/wikipedia/commons/e/ef/Douglas_Crockford.jpg License: CC BY-
SA 2.0 Contributors: Douglas Crockford - Yahoo Original artist: Franco Folini from San Francisco, USA
File:JSON_vector_logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/c/c9/JSON_vector_logo.svg License: Public
domain Contributors: http://clipartist.info//openclipart.org/2011/Sept/September/06-Tuesday/JSON_Logo.svg Original artist: Douglas
Crockford
File:Lock-green.svg Source: https://upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg License: CC0 Contributors: en:File:
Free-to-read_lock_75.svg Original artist: User:Trappist the monk
File:Wikibooks-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikibooks-logo.svg License: CC BY-SA 3.0
Contributors: Own work Original artist: User:Bastique, User:Ramac et al.
File:Wiktionary-logo-v2.svg Source: https://upload.wikimedia.org/wikipedia/commons/0/06/Wiktionary-logo-v2.svg License: CC BY-
SA 4.0 Contributors: Own work Original artist: Dan Polansky based on work currently attributed to Wikimedia Foundation but originally
created by Smurrayinchester
10 13 TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

13.3 Content license


Creative Commons Attribution-Share Alike 3.0

You might also like