我正在尝试使用REST接口将以下内容发送到Neo4j,特别是2.2.9手动教程中给出的关于使用Java的REST,sendTransactional Cypher查询的方法。但是,正如您在下面看到的,我继续收到一个似乎与查询本身无关的错误。
有关如何调试此内容的任何提示?
CREATE (p:player { props }), "parameters" {
"props" : {
"screen_name" : "testone",
"email" : "test.one@gmail.com",
"rank" : "-12",
"password" : "testonepass",
"details" : "test one details",
"latitude" : "0.0",
"longitude" : "0.0",
"available" : "true",
"publish" : "true" }}
{"results":[],"errors":[{"code":"Neo.ClientError.Request.InvalidFormat","message":"Unable to deserialize request: Unexpected character ('p' (code 112)): was expecting comma to separate OBJECT entries\n at [Source: HttpInputOverHTTP@10401de; line: 1, column: 66]"}]}
答案 0 :(得分:1)
从您发布的代码段中,看起来事务端点的有效内容不完整。您可以在浏览器中尝试此语句。我刚刚复制了你的声明并对其进行了格式化,以便将其发布到浏览器中。然后你至少可以看到它的工作。很明显,数据正在发布,似乎只是归结为格式化。
:POST /db/data/transaction/commit {
"statements": [
{
"statement": "CREATE (p:player { props })",
"parameters":
{
"props" : {
"screen_name" : "testone",
"email" : "test.one@gmail.com",
"rank" : "-12",
"password" : "testonepass",
"details" : "test one details",
"latitude" : "0.0",
"longitude" : "0.0",
"available" : "true",
"publish" : "true" }
}
}
]
}