Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rubik90
New Member

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
Shree_30
New Member

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)

v-ljerr-msft
Employee
Employee

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

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!

 

Rubik90
New Member

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.