Using postman, I am posting a JSON message to mule, the HTTP receiver inside mule flow is returning the payload org.glassfish.grizzly.utils.BufferInputStream@ format..
I tried to convert the payload into JSON using "Byte Array to Object" and then "Object to JSON", but I get the payload with lot of new line character
{\n \"Name\": \"John\",\n \"Code\": \"003\"\n}\n \n \t\n "
when I tried to extract the fields Name and code, receiving null
I am expecting the payload as
{ "Name": "John", "Code": "003"
}
Is there something I am missing in the flow?
This must be a common problem, what is the standard way to receive JSON message inside mule flow?
Thank you
org.glassfish.grizzly.utils.BufferInputStream
is not a format but the underlying representation of the data. If the POSTMAN request features a JSONContent-Type
header then you should be able to access fields using the transform component. – afelisatti