Forum Discussion

Ruairi_CloudP's avatar
Ruairi_CloudP
Regular Visitor
3 years ago

Service Now API Invalid Character between object key and value

Hello All, 

 

We're currently trying to get data from a ServiceNow API endpoint, however we keep running into the following error message:

 

Details: "We found an invalid character between object key and value in the JSON input."

 

I've seen this article linked to some other posts which seems to be running into the same issue: https://community.powerbi.com/t5/Desktop/Expression-Error-There-weren-t-enough-elements-in-the/m-p/42288

 

However it hasn't really helped with the issue we're having at this is happening at the source before anything is loaded into Power BI, 

 

Any help with this would be appreciated!

9 Replies

  • Hi Ruairi_CloudP 

    I'm Anton from Alpha Serve.

    I’d like to propose an alternative solution for you, you might want to try out our app - Power BI Connector for ServiceNow:

    We have a handy User and Admin Guides for your convenience, but feel free to reach out support team at [email protected] if you need any assistance.

     

    Thank you.

    Regards,

    Anton

  • bdarcy's avatar
    bdarcy
    Frequent Visitor

    Having the same issue. It sometimes works then sometimes fails with this error message. 

    • tasa's avatar
      tasa
      New Member

      Hi bdarcy , did you ever solved the ServiceNow data load issue "We found an invalid character between object key and value in the JSON input."?

       

      I am facing the same. Sometimes it works, sometimes it doesn't. Very anoying 😒

      • bdarcy's avatar
        bdarcy
        Frequent Visitor

        Hi tasa , we ended up doing a workaround by splitting the single dataflow into multiple. Basically having a couple source queries (ie: using the sysparam filter to divvy up the data which seemed to help) then combining into a final staging dataflow.

         

        Since we only had Pro version of Power BI and could not use incremental load, this helped alleviate the volume of data being returned and the risk of it "falling in on itself".

         

        May not be the most elegant solution but it seemed to work

  • Recently ran into this issue. JSON payload met RFC standards and could be validated in other tools.

    Resolution was upgrading from the v110 (November 2022) to v114 of Power BI.

    No idea what other versions of Power BI were affected.

    • joserenato-nova's avatar
      joserenato-nova
      New Member

      😱mine is v114 and is throwing this same error over and over 
      Anyone any other idea???

      • DonBates's avatar
        DonBates
        New Member

        Just to verify it's definitely the "We found an invalid character between object key and value in the JSON input."?
        Are you running table API or a custom Scripted REST API?

        With API Explorer it was definitely a valid JSON payload?
        Once I had validated it was a valid JSON payload I did play around with ensuring data was trimmed, but with the specific message we're getting here, none of that would have resolved the issue. There was no invalid characters, just a non-printable ASCII 20 space between name-value pair. 
        I suppose there could be some quotation marks in your value that isn't properly escaped by ServiceNow, but seems odd. If you're running a Scripted REST API then start limiting the number of records returned, and make sure they have a specific order, to make your troubleshooting easier. Start with only returning a single specific record.

        I had loaded BI fresh on another computer, but the gentleman that originally reported the issue really did just upgrade his BI in place.