cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
intrasight Member
Member

We found extra characters at the end of JSON input.

Getting this error when doing a "from the web"

Details: "We found extra characters at the end of JSON input."

 

When I send the JSON to a validator it says that it is fine. How can I get more specific details on why it is complaining? There is no further detail in the trace file.

29 REPLIES 29
jPinhao Regular Visitor
Regular Visitor

Re: We found extra characters at the end of JSON input.

I've had a similar issue before. In our case, the input was actually JSONL (json lines or something), and it was basically missing start and end braces around the full json content, as well as commas at the end of each line, to parse it as an array of json objects. Not sure if you're problem is the same, but it might be something along the same lines -> valid json, just not wrapped together properly.

Hope that leads you in the right direction Smiley Happy

intrasight Member
Member

Re: We found extra characters at the end of JSON input.

Nope, it's regular JSON. And it validates with every tool that I've thrown it at. Does Power BI have some "special" JSON needs?

intrasight Member
Member

Re: We found extra characters at the end of JSON input.

I noticed that the section of JSON containing the data table had no line breaks between rows. After adding line breaks, I no longer get the above error message.  This leads me to believe that a) there is some limitation in the JSON parser used by Power BI, and b) this limitation manifests itself with an incorrect error message.

menris Frequent Visitor
Frequent Visitor

Re: We found extra characters at the end of JSON input.

I am seeing the same error and the json being returned by the API is valid. How did you add the line breaks?

intrasight Member
Member

Re: We found extra characters at the end of JSON input.

I would download the JSON from that API and then serve it from your own web app to figure out what are the needed changes. Then make your web app a proxy to the API and make those changes on the fly to the response.

menris Frequent Visitor
Frequent Visitor

Re: We found extra characters at the end of JSON input.

This issue comes when we try to refresh data after uploading the pbix. When we connect to the rest API's in Power BI it works fine there.

bitaria Occasional Visitor
Occasional Visitor

Re: We found extra characters at the end of JSON input.

Was there a definitive answer to this question? I'm trying to load data from a .json file, and while all editors I can think of have no issues with it Power BI throws the error. Is there a log file somewhere that would point to what is causing this error, other than referencing the "extra character"?

Evogelpohl Member
Member

Re: We found extra characters at the end of JSON input.

I'm using Azure Stream Analytics to take IoT data and send it to Azure blog storage as a JSON file. 

 

When I attempt to open the JSON file from within PowerBi Desktop (azure blob), i get this same error.

 

If i download the JSON file to my desktop and open it from there, i get the same error.

 

Solution?

BNajlis New Member
New Member

Re: We found extra characters at the end of JSON input.

Found the same issue when trying to load a JSONL file (http://jsonlines.org/). To solve it, I ended up importing it as a text file (which takes one record per line) and then using the Parse function in PowerQuery to parse the JSON in each line.