简体   繁体   English

OrientDb:创建边缘时解组JSON内容时出错

[英]OrientDb: Error on unmarshalling JSON content when creating an edge

I set up this piece of JSON to use with the OrientDb http API at url /batch/db. 我在URL / batch / db上设置了此JSON以与OrientDb http API一起使用。 I am trying to create an edge of class "cef_CONSISTSOF_cef" which is subclassed from "E". 我正在尝试创建类“ cef_CONSISTSOF_cef”的边缘,该边缘是“ E”的子类。

{"transaction":true, 
 "operations":[ 
    {"type":"c", 
     "record":{ 
        "@class":"cef_CONSISTSOF_cef", 
        "out":"#12:37847", 
        "in":"#12:37641"}
       } 
  ]}

In response I get the following: 作为回应,我得到以下信息:

{ "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 { }" } ] }

Any ideas on what I have done wrong? 关于我做错了什么的任何想法?

I tried your case with this following simple dataset and by using Postman and OrientDB 2.1.15 我使用以下简单数据集并使用Postman和OrientDB 2.1.15尝试了您的情况

在此处输入图片说明

I can give you two options to create the edge througt HTTP request: 我可以给您两个选择来创建边缘HTTP请求:

  1. USING "type" : "cmd" : 使用"type" : "cmd"

在此处输入图片说明

在此处输入图片说明

STUDIO: 工作室:

在此处输入图片说明

  1. USING "type" : "script" : 使用"type" : "script"

在此处输入图片说明

在此处输入图片说明

STUDIO: 工作室:

在此处输入图片说明

EDITED EDITED

  1. USING "type" : "c" : 使用"type" : "c"

在此处输入图片说明

在此处输入图片说明

STUDIO: 工作室:

在此处输入图片说明

在此处输入图片说明

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM