OrientDb:创建边时解组 JSON 内容时出错
OrientDb: Error on unmarshalling JSON content when creating an edge
我将这段 JSON 设置为与位于 url /batch/db 的 OrientDb http API 一起使用。我正在尝试创建 class "cef_CONSISTSOF_cef" 的边缘,它是从 "E".
子 class 编辑的
{"transaction":true,
"operations":[
{"type":"c",
"record":{
"@class":"cef_CONSISTSOF_cef",
"out":"#12:37847",
"in":"#12:37641"}
}
]}
作为回应,我得到以下信息:
{ "errors": [
{ "code": 500, "reason": 500,
"content":
"com.orientechnologies.orient.core.exception.OSerializationException: Error on unmarshalling JSON content
'{\"transaction\":true,\"operations\":[{\"type\":\"c\",\"record\":
{\"@class': content must be between { }" } ] }
对我做错了什么有什么想法吗?
我使用以下简单数据集并使用 Postman 和 OrientDB 2.1.15 尝试了您的案例
我可以给你两个选项来通过 HTTP 请求创建边缘:
- 使用
"type" : "cmd"
:
工作室:
- 使用
"type" : "script"
:
工作室:
已编辑
- 使用
"type" : "c"
:
工作室:
希望对您有所帮助
我将这段 JSON 设置为与位于 url /batch/db 的 OrientDb http API 一起使用。我正在尝试创建 class "cef_CONSISTSOF_cef" 的边缘,它是从 "E".
子 class 编辑的{"transaction":true,
"operations":[
{"type":"c",
"record":{
"@class":"cef_CONSISTSOF_cef",
"out":"#12:37847",
"in":"#12:37641"}
}
]}
作为回应,我得到以下信息:
{ "errors": [
{ "code": 500, "reason": 500,
"content":
"com.orientechnologies.orient.core.exception.OSerializationException: Error on unmarshalling JSON content
'{\"transaction\":true,\"operations\":[{\"type\":\"c\",\"record\":
{\"@class': content must be between { }" } ] }
对我做错了什么有什么想法吗?
我使用以下简单数据集并使用 Postman 和 OrientDB 2.1.15 尝试了您的案例
我可以给你两个选项来通过 HTTP 请求创建边缘:
- 使用
"type" : "cmd"
:
工作室:
- 使用
"type" : "script"
:
工作室:
已编辑
- 使用
"type" : "c"
:
工作室:
希望对您有所帮助