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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Unexpected end of input was found in JSON content

I am trying to refresh a dataset which retrieving data via an api from DY365. But everytime it gives below error in middle of a powerQuery step.  

NeoBA_0-1616162776817.png

"Datasource. Error: ODATA: Invalid Json. Unexpected end of input was found in JSON content. Not all objects and array scopes were closed. "

 

when refreshing the powerBI desktop and the service it gives a similar error as below.

"OLE DB or ODBC error: [DataSource.Error] OData: Invalid JSON. Unexpected end of input reached while processing a JSON string value.."

Appreciate any help since no support found online.

 

Thanks,

NeoC

 

2 ACCEPTED SOLUTIONS
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

this means a Json-file is corrupted. Maybe created by a interface. What you could do if one character is missing at the end and in case put it... so basically reading the binary from json, adding the missing character if missing and then reread it.


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

Hello @Anonymous 

 

I think the error is not even caused by this query but the error is caused by the query you are merging with. So the error appears when the merged query is queried. But still.... the problem is probably a corrupted json-file.

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

7 REPLIES 7
kb_athira
New Member

I also had a similar issue, it git solved automatically after clearing my cache. I closed the existing file after clearing cache and then reopened it with another file name and then data got loaded in the desktop

Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

this means a Json-file is corrupted. Maybe created by a interface. What you could do if one character is missing at the end and in case put it... so basically reading the binary from json, adding the missing character if missing and then reread it.


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Anonymous
Not applicable

Hi @Jimmy801 ,

Update on above. Now it refreshes fine at the powerQuery level. Havent dont anything at all 🙄
and give the same below error after close and apply. But again it will pop up once i refresh the current view in powerQuery!

NeoBA_0-1616223227923.png

 

I know this question is old, but maybe this helps someone. In my case invalid JSON was the consequence of timeout. Query was not finished and followup action failed to process invalid data in json format. The solution is straight forward, give quesry more time.

Anonymous
Not applicable

Hi @Jimmy801 ,

Thanks for the reply.

You think this is the case even the error comes at an middle of a applied step? Cuz when I try to expand a merged query it gives the error. But the destination table query refreshes perfectly fine at the individual refresh.

NeoBA_1-1616215963020.png

Thaks,

NeoBA

 

Hello @Anonymous 

 

I think the error is not even caused by this query but the error is caused by the query you are merging with. So the error appears when the merged query is queried. But still.... the problem is probably a corrupted json-file.

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Anonymous
Not applicable

Thanks @Jimmy801 ,

I have changed the source to SQL since there was no way to validate the json file. Anyway your idea helps.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.