rest - RESTAPI OrientDB Create document Base64 encoding issue -


i try post simple document orientdb server (v2.2.22) using rest api

but recieve 500, here's body send,

{   "@class": "student",   "firstname": "gilles",   "lastname": "bodart",   "dateofbirth": "1992-04-14",   "sexe": "m" } 

and here's response

{     "errors": [         {             "code": 500,             "reason": 500,             "content": "com.orientechnologies.orient.core.exception.oserializationexception: error on unmarshalling json content 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"         }     ] } 

it seems issue wirh date, send string.

in schema, it's typed custom don't relly know why can't modify string

can me ?

to try case used postman , works me, added couple of lines:

{"transaction": false , "operations":[     { "type": "c",       "record" : {             "@class" : "student",             "firstname": "gilles",             "lastname": "bodart",             "dateofbirth": "1992-04-14",             "sexe": "m"         }     } ]} 

this request:

enter image description here

and get:

enter image description here

as can see dateofbirth type string

hope helps

regards


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -