Overview

Connected JSON (CJ) is a JSON format for exchanging connected data (graphs, networks).
Permanent URL: J-S-O-N.org. Remember it as the connected version of JSON.org.

Full specification

https://j-s-o-n.org/connected-json/spec

JSON schema

https://j-s-o-n.org/schema/cj-schema.json

cj logo

CJ is a strict format, for interchange, where each construct has one way in JSON to express it.

Short Example
{ "$schema": "https://j-s-o-n.org/schema/cj-7.0.0.json",
  "graphs":
  [ { "id": "social",
      "label": { "entries": [ { "value": "Simple Social Network" } ] },
      "nodes": [
        { "id": "alice",
          "label": { "entries": [ { "value": "Alice" } ] }
        },
        { "id": "bob",
          "label": { "entries": [ { "value": "Bob" } ] }
        }
      ],
      "edges": [
        { "type": "knows",
          "endpoints": [
            { "node": "alice", "direction": "out" },
            { "node": "bob", "direction": "in" }
          ]
        }
      ]
  } ]
}
Simple Example
Figure 1. Simple Example
A Longer Example
{ "$schema": "https://j-s-o-n.org/schema/cj-7.0.0.json",
  "graphs":
  [ { "id": "social",
      "label": { "entries": [ { "value": "Travel Bookings" } ] },
      "nodes": [
        { "id": "alice",
          "label": { "entries": [ { "value": "Alice" } ] },
          "types": [ "Person" ]
        },
        { "id": "bob",
          "label": { "entries": [ { "value": "Bob" } ] },
          "types": [ "Person" ]
        },
        { "id": "milan",
          "label": { "entries": [
            { "value": "Milan", "language": "en" },
            { "value": "Milano", "language": "it" },
            { "value": "Mailand", "language": "de" }
          ] },
          "types": [ "City" ]
        }
      ],
      "edges": [
        { "id": "booking_82648CX9",
          "type": "knows",
          "endpoints": [
            { "node": "alice", "type": "traveler" },
            { "node": "bob", "type": "traveler" },
            { "node": "milan", "type": "destination" }
          ],
          "data": {
            "year": 2026
          }
        }
      ]
  } ]
}

This example shows a hyperedge (booking_82648CX9), a node with a multilingual label (Milan) and an edge with attached JSON data (booking_82648CX9).

Diagram
Figure 2. Diagram
Import from JSON

For importing JSON graph formats, take a look at the Graph Entry Format, which is a relaxed format, for human authoring, where each graph construct has multiple ways to express it in JSON. Defines how to interpret a range of JSON graph structures as Connected JSON.

Import other Formats

On GraphInOut.com, you can convert other formats to and from CJ.