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

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -