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

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

php - trouble displaying mysqli database results in correct order -

javascript - Trying create a translator based on a preset alphabet -