webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Error in Postman: "Unexpected token NUL in JSON at position 183"

    Posted Tue May 28, 2024 04:55 AM

    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?


    #webMethods
    #webMethods-io-Integration


  • 2.  RE: Error in Postman: "Unexpected token NUL in JSON at position 183"

    Posted Tue May 28, 2024 06:53 AM

    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


    #webMethods
    #webMethods-io-Integration


  • 3.  RE: Error in Postman: "Unexpected token NUL in JSON at position 183"

    Posted Tue May 28, 2024 07:56 AM

    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.


    #webMethods-io-Integration
    #webMethods


  • 4.  RE: Error in Postman: "Unexpected token NUL in JSON at position 183"

    Posted Tue May 28, 2024 09:08 AM

    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


    #webMethods-io-Integration
    #webMethods


  • 5.  RE: Error in Postman: "Unexpected token NUL in JSON at position 183"

    Posted Tue May 28, 2024 10:14 AM

    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.


    #webMethods-io-Integration
    #webMethods


  • 6.  RE: Error in Postman: "Unexpected token NUL in JSON at position 183"

    Posted Tue May 28, 2024 01:31 PM

    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


    #webMethods
    #webMethods-io-Integration