[ https://issues.apache.org/jira/browse/TINKERPOP3-699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stephen mallette reassigned TINKERPOP3-699: ------------------------------------------- Assignee: stephen mallette > GraphSON writeGraph not producing valid json object > --------------------------------------------------- > > Key: TINKERPOP3-699 > URL: https://issues.apache.org/jira/browse/TINKERPOP3-699 > Project: TinkerPop 3 > Issue Type: Bug > Components: documentation > Reporter: Jim Lloyd > Assignee: stephen mallette > Fix For: 3.0.0.GA > > > The following code in the M9-rc3 console produces an incorrect t.json file: > gremlin> graph = TinkerFactory.createModern() > ==>tinkergraph[vertices:6 edges:6] > gremlin> g = graph.traversal() > ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard] > gremlin> f = new FileOutputStream("t.json") > ==>java.io.FileOutputStream@7927bd9f > gremlin> mapper = > graph.io(IoCore.graphson()).mapper().embedTypes(true).create() > ==>org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper@63f34b70 > gremlin> > graph.io(IoCore.graphson()).writer().mapper(mapper).create().writeGraph(f, > graph) > ==>null > gremlin> f.close() > ==>null > The file is a stream of independent vertices rather than a single json object > following the GraphSON schema. I.e. the output looks like the this: > {"id":1,"label":"person", ... } > {"id":2,"label":"person", ... } > {"id":3,"label":"software", ... } > Where ... represents omitted fields. > A separate issue but related issue is that the documentation examples use > "CoreIo" but the actual name of that class is "IoCore", as shown in the > console session above. -- This message was sent by Atlassian JIRA (v6.3.4#6332)