如何将Neo4j结果转换为GraphJSON [英] How to convert Neo4j Result to GraphJSON
问题描述
我想在Alchemy.js中使用GraphJSON格式进行可视化.获得CQL执行的结果后,我想将结果数据转换为GraphJSON格式.是否有一些可用的API,否则我将不得不迭代该集合并创建GraphJSON格式?我正在使用Java API.
I want to use GraphJSON format in Alchemy.js for visualization . After getting the Result of CQL execution , I want to convert the Result data to GraphJSON format . Is there some API available or I will have to iterate the collection and create the GraphJSON format?. I am using Java API.
提前谢谢.
推荐答案
我编写了一个演示应用程序,该应用程序查询Neo4j并返回graphjson以使用alchemy.js进行渲染
I wrote an demo app that queries Neo4j and returns graphjson to render with alchemy.js
您可以在这里找到它
默认情况下针对未经身份验证的本地服务器运行
running against an non-authenticated local server by default
这是用于创建graph-json的代码
this is the code that's used to create the graph-json
https://github.com/jexp/cy2neo/blob/master/scripts/neo.js#L36
这篇关于如何将Neo4j结果转换为GraphJSON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!