jaya k
jaya k

Reputation: 47

HTTP Not receiving JSON payload

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

Upvotes: 0

Views: 397

Answers (1)

jaya k
jaya k

Reputation: 47

problem solve. Used transform

%output application/java

payload]]> , now I can access the fields using #[payload.field],

Upvotes: 0

Related Questions