What is JSON (JavaScript Object Notation)?

What is JSON (JavaScript Object Notation)?

About

JSON 99http://json.org/)) is a structured text format that stands for JavaScript Object Notation.

It is a simple text format that can be used for representing nested structures of data (lists of lists of dictionaries, …).

Why the J stands for Javascript in JSON ?

Because JSON is a format that comes from javascript.

Specifically specified in the RFC 4627:

JSON is a lightweight data interchange format based on a subset of JavaScript syntax (ECMA-262 3rd edition).

If you write the text object of a JSON file in a Javascript script, it will be directly seen as a JavaScript object.

Json vs Xml vs Tabular vs Yaml

JSON (Javascript Object Notation) has an obvious:

  • advantage over XML in that the response is lightweight. Parsing such a result is trivial in JavaScript as the format is already a valid Javascript object.
  • disavantage over tabular formats in that the space is less efficient. Example: Table - Csv Data Structure

YAML want to be an official subset of JSON. Every JSON file is also a valid YAML file (but not the other way around).

How can I represent a value in Json ?

Json supports only the following data type:

Object

A json object shows the following syntax 1):

{
  "Image": {
    "Width": 800,
    "Height": 600,
    "Title": "View from 15th Floor",
    "Thumbnail": {
      "Url": "http://www.example.com/image/481989943",
      "Height": 125,
      "Width": "100"
    },
    "IDs": [
      116,
      943,
      234,
      38793
    ]
  }
}

Array

A json array 2)shows the following syntax

[ "foo", "bar" ]
[ 1, 2 ]
[
  {
    "precision": "zip",
    "Latitude": 37.7668,
    "Longitude": -122.3959,
    "Address": "",
    "City": "SAN FRANCISCO",
    "State": "CA",
    "Zip": "94107",
    "Country": "US"
  },
  {
    "precision": "zip",
    "Latitude": 37.371991,
    "Longitude": -122.026020,
    "Address": "",
    "City": "SUNNYVALE",
    "State": "CA",
    "Zip": "94085",
    "Country": "US"
  }
]

String, Number, Boolean, Null

An object with:

{
  "precision": "zip",
  "Latitude": 37.371991,
  "object": true,
  "array": false,
  "yolo": null
}

Syntax

Rfc

  • rfc4627 - The application/json Media Type for JavaScript Object Notation (JSON)
  • rfc7493 - The I-JSON Message Format - I-JSON (short for “Internet JSON”) is a restricted profile of JSON designed to maximize interoperability and increase confidence that software can process it successfully with predictable results.

Schema

Json-schema is a notation to define the structure/schema of a thing. Json-Schema

Format Specification from third application

Management

Parsing

See Json - Library

API Building

http://jsonapi.org/ - A specification for building API in Json

Json API

Comment

json does not support comment. A jsonc format has then make its apparition for config files.





Discover More
Card Puncher Data Processing
Amazon Athena

is an query service against data in Amazon S3. Athena query engine is based on hive. See Langauge reference An external table...
Drill Web Console
Apache Drill

Drill is a SQL Engine aimed to be able to query data file stored in a file system structure. At the core of is the 'Drillbit' service, which is responsible for accepting requests from the client, processing...
Card Puncher Data Processing
Application - Configuration File (Conf)

Configuration file are files used to: store command argument / enviroment variable or pass values They have a structural hierarchy where each parent node is generally known as a section. There...
BSON (Binary Json)

BSON [bee · sahn], short for Bin­ary JSON, is a bin­ary-en­coded seri­al­iz­a­tion of JSON-like doc­u­ments. js-bson - bson parser
Chrome Enable Source Map
CSS - Source Map

CSS For each CSS file it produces, a CSS preprocessor generates: a source map file (.map) and the compiled CSS. The source map file is a JSON file that defines a mapping between: each (compiled|generated)...
Data System Architecture
Database - Document Database

A document database is a database that can store and retrieve a document (generally a json document) at once. The data unit is generally not the record as in a relational database but the document. ...
Card Puncher Data Processing
Extensible Markup Language (XML)

is a flexible way to create common information formats and to share the formats and data between applications and on the internet. XML is, essentially, a platform-independent means of structuring informationelementschemjsoXML...
Card Puncher Data Processing
Ezoic

(Ez) tracker page. is installed on website as a forward proxy which means that the request seems to come from the publisher website. uses the following endpoint /ezoic/e.gif...
Undraw File Manager Re Ms29
File - Extension

The file extension is the last three characters at the end of the file path (ie therefore at the end of the file name). It describes the structure of the content. On application that may open files such...
Data System Architecture
GeoSpatial - GeoJson

GeoJSON is a formalized syntax of JSON objects, optimized for storing geodata. All GeoJSON object are JSON objects, and all JSON objects are JavaScript objects. The format is supported on GitHub...



Share this page:
Follow us:
Task Runner