Experimenting with JSON

JavaScript Object Notation (JSON) is a lightweight programming independent data interchange format. It is mainly used in web applications to transmit information. It is not only simple for humans to read but easy for machines to parse and generate. JSON has some advantages for traditional extensible markup language (XML):

  • XML data is a typeless only string, whereas JSON data is typed like string, number, array, and boolean
  • JSON data is readily accessible, whereas XML data needs to be parsed and assigned to variables

The JSON syntax is a subset of the JavaScript syntax. There are some rules when it comes to JSON syntax:

  • Data is defined in name/value pairs
  • Data is separated by commas
  • Curly braces hold objects
  • Square ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.