spring mvc - JSON RAW REQUEST in controller -


i have code below

    @requestmapping(method = requestmethod.post)     public @responsebody serviceresponse submitcustomerorder(@requestbody submitcustomerorderrequest submitcustomerorderrequest,httpservletrequest request)     {      string json=????     } 

i need de-serialization should happen submitcustomerorderrequest object need raw json request in string logging request purpose.

can me on this.

use google's gson library

log.info(new gson().tojson(submitcustomerorderrequest)) 

Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -