Open zotona opened 8 years ago
@zotona Ok i will provide two examples:
@RequestMapping(method = RequestMethod.PUT)
def putPerson(Person p) {
graphFactory.withTransaction {
p.save()
}
}
In the above case you must register jackson object mapper for your object, but i didnt tested how it works with this lib.
@RequestMapping(method = RequestMethod.PUT)
def putPerson(String person) {
def slurper = new groovy.json.JsonSlurper()
graphFactory.withTransaction {
new Person((Map) slurper.parseText(person)).save()
}
}
You can give a star if you like this project. Thank you.
Thanks for the answer. 1st example doesnt work. something wrong this objectmapping in jackson http2objecthandler (could not instantiate Person class) 2nd - worked.
Hi! Very interesting project! Could you provide some small example to persist json string to orient?