Inserting data using GraphSON

How to insert data into a graph database using GraphSON.

GraphSON is JSON data that defines a vertex with its ID and label, outgoing and incoming edges, and properties.


  1. Identify the vertex ID and label.

    Each vertex must have an identifier. Generally, a label is defined to denote the type of vertex. In this example, the vertex shown is an author vertex.

  2. Identify the vertex properties.
            "value":"Simone Beck"}]

    Each property is identified with a name, ID, and value. The example shows the author name name, which has a value of Simone Beck, and gender valued as F.

  3. Add outgoing edges.
        "inV":{"~label":"book","member_id":52,"community_id":1733329920}}, {

    Each edge must have a label and ID. The example shows an authored edge. For an outgoing edge as shown in the example, an incoming vertex, inV, must be identified by vertex identification.

  4. Close and name the GraphSON file, using a suffix of ".json".