Loading and writing data using GraphSON

How to load and write GraphSON data.

The Tinkerpop GraphSON Reader can be used to load and write data.


  1. Start the Gremlin console.
  2. Start a graph instance and create the schema.
  3. Use the DSE Graph Loader to load the GraphSON file.
  4. Writing data out of the graph into a GraphSON file while capturing the original data types of the inserted data can be accomplished with a short script:
    gremlin> f = new FileOutputStream("/tmp/recipe_lossless.json");
    mapper = graph.io(graphson()).mapper().embedTypes(true).create(); 

    A sample of the output shows the class information and data types: