neo4j version 3.4.0
The gps node contains three attributes:
coordinates: point
location: string
type: string
eg: coordinates: point({srid:4326, x:30.655691, y:104.081602}) ,location: shanghai ,type: gps
I encountered an error while querying:
curl http://IP:PORT/db/data/transaction/commit -u xxxx:xxxx -H "Content-Type: application/json"
-d "{
"statements": [{
"statement": "match (n:gps) return n",
"parameters": {},
"includeStats": true,
"resultDataContents": ["rest"]
}]
}
"
Error is as follows: "code": "Neo.TransientError.Network.CommunicationError", "message": "Current context not an ARRAY but OBJECT", "stackTrace": "org.codehaus.jackson.JsonGenerationException: Current context not an ARRAY but OBJECT
But the following procedure was successful
curl http://IP:PORT/db/data/transaction/commit -u xxxx:xxxx -H "Content-Type: application/json"
-d "{
"statements": [{
"statement": "match (n:gps) return n.coordinates,n.type,n.loacation",
"parameters": {},
"includeStats": true,
"resultDataContents": ["rest"]
}]
}
"