final Vertex v2 = g.addVertex(T.label, "person");
final Edge e = v1.addEdge("friends", v2, "weight", 0.5f);
try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
writer.writeVertex(os, v1, Direction.OUT);
final AtomicBoolean calledVertex = new AtomicBoolean(false);
final AtomicBoolean calledEdge = new AtomicBoolean(false);
final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {