Pm.Response doesn`t match with Response Body

Hi,

I need your help, I’m running a POST request and try to get some of the fields in the response to a environment variable and for some magical reason, the value retrieved by pm.response when converting to json is not the one retrieved by the Server

In attached screenshot you can see the different values I’m getting

In red the response convert to Json
in blue the response in text
In green the response retrieved by the Server

Could you please advice why the sessionId value retrieved by postman is different when converting to Json???

Thanks

1 Like

Ey :wave: since nobody answer you, and I was facing the same problem recently

I noticed, it was something related with the .json() function.

specifically a JS problem a not a Postman problem, it’s related and how JS parse handle big integer numbers.

if you use the .text() function you’ll get the correct value, but you should use regex to get the number

Just answering this here, maybe anybody faces the same problem in the future

1 Like