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
Anonymous
Not applicable

What is the best readable json format with multiple lists

Hi,

I want to read a json file but I keep getting this error :

 

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

 

The file looks like this :

 

{"alerts": [{"country": "US", "nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"}

{"alerts": [{"country": "SW", "nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"}

{"alerts": [{"country": "SG", "nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"}

 

So, between `}` of the first end and `{"alerts"` of second one, should I have delimiter such as `\n` or `,` or nothing at all?

How to make this kind of JSON file to be readable and preventing the above error.

 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Thanks for amitchandak sharing.

As tested, the json script is valid below.

Capture3.JPG

[{"alerts": [{"country": "US"}, {"nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"},
{"alerts": [{"country": "SW"},{"nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"},
{"alerts": [{"country": "SG"}, {"nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"}]

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Thanks for amitchandak sharing.

As tested, the json script is valid below.

Capture3.JPG

[{"alerts": [{"country": "US"}, {"nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"},
{"alerts": [{"country": "SW"},{"nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"},
{"alerts": [{"country": "SG"}, {"nThumbsUp": 0}], "startTime": "2020-05-31 17:01:00:000", "endTime": "2020-05-31 17:02:00:000"}]

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

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.