Error in Postman: "Unexpected token NUL in JSON at position 183"

Hello,

it seems that many of us face an issue when trying to use Postman - while sending JSON (a copy+paste from the Handson PDF) from Postman, we get the following error:
{“error”:{“message”:“Unexpected token \u0000 in JSON at position 183”}}

It doesn’t seem to be a Postman issue. SOAP UI was tried as well but with the same error.

The logs indicate that the workflow didn’t even start, or maybe it started but failed on the first START activity and didn’t move to next one.

Could you please check?

Hi Vladimir,

you should check where this “\u0000”-Unicode character is coming from.
When your data is meant to be UTF-8 compliant, this character is not allowed.

Regards,
Holger

Hello, the issue is there is no such a position 0183. here is the whole JSON we send:
{
“title”: “Person”,
“type”: “object”,
“firstName”: “Joe”,
“lastName”: “Doee”,
“age”: “”,
“actionStatus”: “success”
}
but we tried it even with empty JSON, and still got the same 183 position error. It seems to be not relevant on the message body.

Hi Peter,

in this case provide us the wM version you are running on as well as a screenshot from your service which is invoked when the JSON is sent to the IS.

Regards,
Holger

I would check the copy-paste content with an editor that shows invisible characters. I don’t remember how often such examples from PDFs look correct but actually contain “weird” characters.

1 Like

Hi,

or you can use an editor which can show the hex values of the content.
Remember that UTF-8 content always consists of two bytes per character.
But it cannot contain a “NUL” (“\u0000”) Unicode character directly as this particular one is transcoded into another value to avoid long series of zero-value bits/bytes for transporting reasons.

Regards,
Holger

1 Like