B.1 GraphSON Data Format

The GraphSON file format is based on JavaScript Object Notation (JSON) for describing graphs.

The example in this topic shows a GraphSON description of the property graph shown in What Are Property Graphs?.

Example B-1 GraphSON Description of a Simple Property Graph

{
    "graph": {
        "mode":"NORMAL",
        "vertices": [
            {
                "name": "Alice",
                "age": 31,
                "_id": "1",
                "_type": "vertex"
            },
            {
                "name": "Bob",
                "age": 27,
                "_id": "2",
                "_type": "vertex"
            }       
        ],
        "edges": [
            {
                "type": "friends",
                "_id": "3",
                "_type": "edge",
                "_outV": "1",
                "_inV": "2",
                "_label": "knows"
            }
        ]
    }
}