by Jon Penland
December 12, 2018
December 12, 2018

JSON Introduction and Resources

JSON, short for JavaScript Object Notation, was initially conceived as a way to transport JavaScript objects between a browser and web server. However, today the name is a bit of a misnomer since JSON can be used as a data transportation format with virtually any popular programming language.

JSON has become the default choice for formatting data for use in interactive web applications. It has a very lightweight syntax and is very easy to learn, read, and write.

History of JSON

JSON wasn’t invented, it was “discovered.” While he wasn’t the first to use JSON, Douglas Crockford is typically credited with discovering the format because he was the first to popularize and specify its use around the year 2001. However, in a presentation to Yahoo! Developers, Crockford reveals that he discovered that JSON was in use at Netscape as early as 1996.

Prior to its discovery, JSON existed as an unintentional byproduct of existing browser capabilities. Crockford, a cofounder of software company State Software, was developing an AJAX web application framework. However, State Software needed to find a way to enable real-time two-way browser-to-server communication without relying on Flash plugins or Java applets. It was this need that served as the impetus behind the discovery of JSON.

Originally, Crockford thought of JSON as part of the JavaScript language and named it accordingly. However, since JSON consists of nothing more than commas, curly braces, square brackets, and data, it can be easily parsed into an array or object by any programming language. Because of it’s language independence, JSON was established as a standalone ECMA standard in 2013 (ECMA-404) and then extended and referenced by Internet Engineering Task Force (IETF) Request For Comment (RFC) 7159 one year later.

How is JSON Used Today

JSON is the default choice for transporting data on the internet. It has surpassed formats like XML and CSV due to its simplicity and language-independence. Modern JSON implementation generally falls into one of two categories:

  • Web service APIs use JSON format to make data available to third-party applications.
  • AJAX interactions often use JSON to shuttle data between a server and a visitor’s browser.

In both cases, client-side manipulation of JSON with JavaScript will be necessary to render the data. In addition, if the data is going to be used to perform any action on a web server, then a server-side programming language and language-specific JSON library will do the work on the server.

JSON Data Structures

JSON data is formatted into two data structures that are used universally in all modern programming languages:

  • A JSON array is a list of values.
  • A JSON object is a collection of name-value pairs.

That may seem straightforward enough, but things get a bit more complex when you consider that the values in arrays and objects can contain numbers, booleans, strings, null values, or even nested arrays and objects. Names, on the other hand, can only be strings.

JSON Data Examples

Definitions are useful, but what’s even more useful is to see some JSON data. Let’s take a look at a simple array.

[ "red", "green", "blue", 7 ]

That array contains four values: three strings and a number. Let’s take things up a notch with a simple object.

  "event": "breakfast",
  "location": "Tiffany's",
  "remember": true,
  "format": "film",
  "bothKindaLikedIt": true,
  "thingsInCommon": 1

Ok, now things are getting a little more interesting. In this object, we have six name-value pairs. Each name is a string and the values consist of three strings, two boolean values, and one number.

We have time for one more example. In this case, a more complex object with nested arrays and objects.

 "contentManagementSystems" : [
  "name": "WordPress",
  "percentMarketShare": 58.9
  "name": "Joomla",
  "percentMarketShare": 6.1
  "name": "Drupal",
  "percentMarketShare": 4.9

We started things out with a single name-value pair using the name "contentManagementSystems". The value is a somewhat complex array (we know that because of the square brackets) that contains the rest of the data in the object. However, rather than holding simple values, each value in the array is a nested name-value pair (also known as an object and identified as such by the curly braces).

In other words, this is a JSON object that contains an array of objects. Got it? Good.


So now you know what JSON is, but maybe you want to learn how to actually use JSON. If so, you’re in luck. Here are some of the finest JSON resources the web has to offer:

JSON and Your Favorite Language

As we’ve mentioned more than once, JSON data can be used with virtually any programming language. We’ve located a few tutorials that will help you get started using JSON for web development with Java, PHP, or the .NET framework.


If you prefer your education to printed and bound form, here are three of the best JSON texts money can buy:

  • Introduction to JavaScript Object Notation: A To-the-Point Guide to JSON (2015) by Lindsay Bassett is a concise guide to JSON implementation that covers Web APIs, server-side language libraries, and client-side JSON manipulation.
  • JSON at Work (2016) by Tom Marrs will show you how to work with JSON using JavaScript, jQuery, HTML5, Ruby, and Java.
  • Beginning JSON (2015) by Ben Smith says that it covers “beginning” JSON, but the truth is that this text covers a lot more than the basics.


JSON is a concise, language-independent format for transmitting data between web servers and browsers. It’s the data transportation format of choice for modern AJAX-powered interactive web apps and web service APIs. Thankfully, JSON is also easy to get started with and will almost certainly work just fine within your favorite web development environment.

Further Reading and Resources


  • XML Resources: once thought to be the replacement for HTML, it is still a very popular data storage and transfer language.
  • PHP Introduction and Resources: the most popular server-side programming language in the world — and for a reason.
  • ASP.NET Resources: this guide will get you going with Microsoft’s .NET framework for creating webpages.

What Code Should You Learn?


About Jon Penland
