有没有办法从 TitanDB 图表中创建 JSON?
我可以将 Titangraph 加载到 graphml ,然后将其加载到 Gephi 并输出为 gexf/json 使用一些插件。 我想知道是否可以在完全不涉及 Gephi 的情况下执行此操作,或者作为替代方案,只需使用 Gephi Java API 来创建 gexf/json。 我偏爱 JSON,因为它的尺寸较小。
最佳答案
您可以使用 GraphSON作为 JSON 选项。在 Titan Gremlin 控制台中,您应该能够执行以下操作:
gremlin> g.saveGraphSON("/tmp/my-graph.json")
更新:对于 Titan 1.0 和 TinkerPop 3.x,语法随着 TinkerPop 3.x API 的变化而变化:
gremlin> graph.io(graphson()).writeGraph("/tmp/graph.json")
上面的“graph”是指 TitanGraph
实例。在找到的 TinkerPop 3 文档中有关于 GraphSON 的更多信息 here
关于json - Titan DB 图到 JSON,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25956361/