neo4jlibcurljsonforms

Get invalid json format from Neo4j using libCurl


The CypherQuery I used is {“statements” : [{ “statement” : “MATCH (n:ns0__Meas) RETURN n LIMIT 25” }]}.

I've been reading the return String via CURLOPT_WRITEDATA, but the format of the returned json is strange.

{"results":[{"columns":["n"],"data":[{"row":[{"ns0__Name":"Meas30008","ns0__Value":"15500","uri":"http://test.ac.kr/m#_30008"}],"meta":[{"id":1097,"elementId":"4:45f39f8e-89c4-4f8d-9a3a-be92f6961fbf:1097","type":"node","deleted":false}]}]}],"errors":[],"lastBookmarks":["FB:kcwQRfOfjonET42aOr6S9pYfv8kAk5A="]}

The reason why I call it a different format of JSON is because it is very different from the format of JSON that I usually see. Is this a usage issue for Curl that I bring to JSON?


Solution

  • The response you are seeing conforms to the documented JSON result format for the Neo4j HTTP API. The documentation also shows 2 other supported result formats.