<< Chapter < Page Chapter >> Page >
JSON is a general purpose data interchange format that is supported by Java, PHP, JavaScript, and other programming languages. JSON is a standard that describes how ordered lists and unordered maps, strings boolean values and numbers can be represented as text in a string.

Table of contents

Preface

This module is one in a collection of modules designed for teaching ITSE 1356 Introduction to XML at Austin Community College in Austin, TX.

The title of this module is "What is JSON?" Given that there are dozens of tutorials and blogs on the web that talk about JSON, you areprobably wondering why we need another tutorial on JSON.

Specialized modules

The modules in this collection are very specialized. As indicated above, they are designed for teaching a very specific XML course at the college where I teach.That course is predominately based on XML and uses an XML textbook for the major portionof the course.

An alternative to XML

The online document titled Introducing JSON begins as follows:

"JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language."

Because JSON is an emerging alternative to XML, beginning in the Fall of 2014, the course will include an introductorysection on JSON. The modules in this collection and the online resources pointed to by these modules will be the primary learning resource for the JSON portionof the course.

JSON could conceivably be used for a variety of purposes. However, for the purposes of this course, it will be viewed solely as a data-interchangelanguage and an alternative to the use for XML for that same purpose.

Background information

JSON is an acronym for JavaScript Object Notation . Don't be fooled by the name however. Although JSON is based on JavaScript object syntax, it is notintended to be JavaScript (at least not exclusively JavaScript) .

A general data interchange format

Instead, similar to XML, JSON is a general purpose data interchange format that is supported by Java, PHP, JavaScript, and otherprogramming languages. JSON is a standard that describes how ordered lists and unordered maps, strings boolean values and numbers can be represented as text in a string.

Just like XML, JSON provides a way to pass structured information between languages or between different computing environments using the same language.

Typical operation

Typically a data construct, (such as an object for example) , in one programming environment will be transformed into a JSON string. That string will betransported to another programming environment where it will be transformed into a data construct, (such as a hash table for example) , that is suitable for use in that programming environment

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Introduction to xml. OpenStax CNX. Dec 02, 2014 Download for free at https://legacy.cnx.org/content/col11207/1.18
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Introduction to xml' conversation and receive update notifications?

Ask