简体   繁体   中英

How to save json as vertex properties values using gremlin query

I am trying to save a json as a vertex's property value. Below is my query.

String createVrtx = "g.addV('Person').property('id','123').property('Address','{"City":"bang","pin": "123456"}')";

but getting Runtime Excution Exception query can't compile.

So what i to do for submit json as vertex value.

You likely need to escape your double quotes in the json String. String createVrtx = "g.addV('Person').property('id','123').property('Address','{\\"City\\":\\"bang\\",\\"pin\\": \\"123456\\"}')";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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