cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rubik90 Frequent Visitor
Frequent Visitor

Cannot load JSON file

I have to load a JSON dataset into Power BI, but it does not works and show me the following error:

 

"Additional characters were detected at the end of JSON input"

 

I checked it with a JSON validator and everything went for the best, so the syntax is OK.


Can someone help me?

 

Thanks in advance
Antonio

4 REPLIES 4
Rubik90 Frequent Visitor
Frequent Visitor

Cannot load JSON dataset into Power BI

I have to load a JSON dataset into Power BI, but it does not works and show me the following error:

 

"Additional characters were detected at the end of JSON input"

 

I checked it with a JSON validator and everything went for the best, so the syntax is OK.


Can someone help me?

 

Thanks in advance
Antonio

v-ljerr-msft Super Contributor
Super Contributor

Re: Cannot load JSON file

Hi @Rubik90,

My troubleshooting steps:

 

  • Using a 2 line sample from one of the JSON files, I run it through a parser and get parser errors (expecting 'EOF')
  • When I wrap the JSON in square brackets and separate the lines with a comma, it parses fine
  • I downloaded one of the JSON files and made 2 copies of it. I then edited one to have the brackets and comma delimiter and left the other one alone. I was unable to load the unedited JSON into PBI, but had no problem with the one I edited.


I tried the solution provided by @DolEgon22 in this similar thread, and it worked for me. Could you go to check if it works in your scenario? Smiley Happy

 

Regards

CarCrazyBen Frequent Visitor
Frequent Visitor

Re: Cannot load JSON file

I, too, am encountering trouble attempting to parse a JSON file. Not being knowledgeable enough about JSON structures, I am not sure how to apply the proposed fix.

 

My original document (slightly edited to protect the innocent) is:

{
 "id": "4d0c1c1e12ce226e6f44db7727a6e19dde3ead35-bd_SomeUser@somedomain.com_2017-10-24T18:53:42.559Z",
 "key": [
  "SomeUser@somedomain.com",
  "2017-10-24T14:26:34-06:00"
 ],
 "value": "2017-10-24T20:26:35.596Z",
 "_id": "4d0c1c1e12ce226e6f44db7727a6e19dde3ead35-bd_SomeUser@somedomain.com_2017-10-24T18:53:42.559Z"
}

 

Can anyone help me through editing/modifying this document so PBI can successfully parse it?

Thank you!

 

Shree_30 New Member
New Member

Re: Cannot load JSON file

You can use python script for this issue.

The python code is:

import pandas as pd

Data=pd.read_json(r"Your json file path",lines=True)