liveBook · Manning

JSON

As explained in D3.js in Action, Third Edition

JSON is a text-based data interchange format representing structured values with objects, arrays, and primitive values.

JSON (JavaScript Object Notation) is a common text format for storing simple data structures. Its object notation represents values as key-value pairs, making fields accessible through JavaScript dot notation. section 3.1.3

[
  {
    id": 1,
    "name": "Zoe",
    "position": "Data analyst",
    "works_with_d3": false
  },
  {
    "id": 2,
    "name": "James",
    "position": "Frontend developer",
    "works_with_d3": true
  },
  {
    "id": 3,
    "name": "Alice",
    "position": "Fullstack developer",
    "works_with_d3": true
  },
  {
    "id": 4,
    "name": "Hubert",
    "position": "Designer",
    "works_with_d3": false
  }
]

An employee dataset represented as an array of JSON objects, including numeric, text, and Boolean values. section 3.1.3

JSON fits common data workflows in D3:

How D3.js in Action, Third Edition covers it

How deep it goes
Defines objects, arrays, and key-value access, but does not develop JSON syntax or complex data modeling.
Examples
Uses an employee array containing identifiers, names, positions, and Boolean D3 experience fields.
What it assumes
Builds on JavaScript objects and dot notation while identifying JSON as a common data structure.
What you can do after
Apply JSON via d3.json() and access object fields with JavaScript dot notation.
How it connects
Connects JavaScript objects, arrays, dot notation, API endpoints, and D3 data loading.

Also explained in

Compare how 35 books explain JSON →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of D3.js in Action, Third Edition. The section links point to the parts of the book it draws on.