Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postman Malformed JSON #1762

Closed
parthcodes opened this issue Feb 28, 2016 · 4 comments
Closed

Postman Malformed JSON #1762

parthcodes opened this issue Feb 28, 2016 · 4 comments

Comments

@parthcodes
Copy link

Hi,

I am trying to test a REST API in my local from Postman, where I am getting following error:

Malformed JSON: Expected 'r' instead of 'e' in "Pretty" tab of the response. In "Raw" and "Preview" give correct response.

Can you help me understand what can be a problem here ?

image

image

@abhijitkane
Copy link
Member

@parthcodes The pretty view's JSON mode is meant for JSON responses only. If you change the JSON in the dropdown to text, you should be able to see the response in the pretty view.

Try hitting a URL like http://echo.getpostman.com/get. You'll be able to use the 'JSON' view in the pretty mode.

@clintfidel
Copy link

clintfidel commented Sep 19, 2017

make sure what you are passing in is in the right json format.....
it should be like this
{
"title": "coding"
"author": "clintfidel"
}
i solved my own error like this

@shoaibjdev
Copy link

@clintfidel - Still your JSON is incorrect, A comma is missing after "title": "coding"

I too faced the same issue, and it was missing comma issue during transformation on API Gateway layer.

@wnmurphy
Copy link

wnmurphy commented Jul 18, 2018

Got same error in Postman without the "Malformed JSON" bit. Clicking on raw tab for body showed data was received, turns out it was malformed JSON. If you get this error or something similar, try grabbing the body from the raw tab and linting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants