Definition

JSON (Javascript Object Notation)

JSON (Javascript Object Notation) is a text-based, human-readable data interchange format used for representing simple data structures and objects in Web browser-based code. JSON is also sometimes used in desktop and server-side programming environments. JSON was originally based on the Javascript programming language and was introduced as the page scripting language for the Netscape Navigator Web browser.

JSON is used in Javascript on the Internet as an alternative to XML for organizing data. Like XML, JSON is language-independent and may be combined with C++, Java, Python, Lisp and many other languages. Unlike XML, however, JSON is simply a way to represent data structures, as opposed to a full markup language. JSON documents are relatively lightweight and are rapidly executed on Web server.

JSON consists of "name : object" pairs and punctuation in the form of brackets, parentheses, semi-colons and colons. Each object is defined with an operator like "text :" or "image :" and then grouped with a value for that operator. The simple structure and absence of mathematical notation or algorithms, JSON is easy to understand and quickly mastered, even by users with limited formal programming experience, which has spurred adoption of the format as a quick, approachable way to create interactive pages.

Novice users of JSON need to be aware of potential security implications. As JSON scripts automatically execute in any Web page that's requested by a Web browser, they can be used to implement JavaScript insertion attacks against a Web client, like a command injection or cross-site scripting. For example, if a hacker inserts non-JSON code into the string, like a Trojan horse, the targeted algorithm executes the text in as if it were Javascript and then returns the value of the last statement. If the only statement was a JSON value, there's no effect. If a previous statement contains other Javascript code, however, that code will be executed by the script. The hacker might then have access to all the variables a script has access to, potentially compromising a user's PC.

Editors at our sister site, The Ajaxian, blog about Ajax and JSON strategies and trends.

This was last updated in October 2007
Posted by: Margaret Rouse

Email Alerts

Register now to receive SearchWinDevelopment.com-related news, tips and more, delivered to your inbox.
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

More News and Tutorials

  • ASP.NET Ajax Tutorial

    This reference introduces developers to Microsoft's ASP.NET Ajax framework with a plethora of tips, tutorials and webcasts.

  • Simplifying .NET performance management

    dynaTrace has unveiled the next major version of its flagship application performance measurement (APM) tool, which includes FastPacks that simplify the process of monitoring Microsoft applications.

  • How to use jQuery to solve Javascript browser compatibility problems

    Javascript compatibility between Firefox, Internet Explorer and other browsers can make Ajax and Javascript effects a headache. Each browser does things just a bit differently, forcing Web developers to check which browser the user has and branch their code into if-else statements accordingly. Learn how to use the Javascript library jQuery to solve browser compatibility problems for you.

Do you have something to add to this definition? Let us know.

Send your comments to techterms@whatis.com

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: