RESTAPI OrientDB 创建文档Base64编码问题

RESTAPI OrientDB Create document Base64 encoding issue

我尝试 post 使用 REST API

向我的 OrientDB 服务器 (v2.2.22) 发送一个简单的文档

但是我收到了 500,这是我发送的正文,

{
  "@class": "Student",
  "firstName": "Gilles",
  "lastName": "Bodart",
  "dateOfBirth": "1992-04-14",
  "sexe": "M"
}

这是回复

{
    "errors": [
        {
            "code": 500,
            "reason": 500,
            "content": "com.orientechnologies.orient.core.exception.OSerializationException: Error on unmarshalling JSON content for record: \"@class\":\"Student\",\"firstName\":\"Benjamin\",\"lastName\":\"Leroy\",\"dateOfBirth\":\"1992-10-31\",\"sexe\":\"M\"\r\n\tDB name=\"Memoire\"\r\n--> com.orientechnologies.common.io.OIOException: Bad Base64 input character decimal 45 in array position 4"
        }
    ]
}

日期似乎有问题,但我将其作为字符串发送。

在我的模式中,它的类型是 Custom 我不知道为什么,但我不能将它修改为 String

谁能帮帮我?

为了试试你的情况,我使用了 Postman,它对我有用,我只添加了几行:

{"transaction": false , "operations":[
    { "type": "c",
      "record" : {
            "@class" : "Student",
            "firstName": "Gilles",
            "lastName": "Bodart",
            "dateOfBirth": "1992-04-14",
            "sexe": "M"
        }
    }
]}

这是请求:

这就是我得到的:

您可以看到 dateOfBirth 类型是 STRING

希望对您有所帮助

此致