问题
i am using Neo4j 2.0.3 DB and using C# client to access neodb. I could not find any way by which after querying db i can get results in the form of Json. Please give me some links or examples
回答1:
You can get Cypher Query results in JSON format
eg. Consider a graph with person nodes and nodes have property personId. The below query will give you result in the form of json object.
MATCH (n:PERSON)-[:friend]->(friend:PERSON) RETURN {personId: n.personId, friends: collect(distinct friend.personId)} as PersonData
Now you have the json string. Now using this or anyother way you can get it in an object
来源:https://stackoverflow.com/questions/24751399/how-to-get-result-from-cypher-query-in-json-using-neo4j-c-sharp-client