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

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 @NeoBA 

 

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

Jimmy801
Community Champion
Community Champion

Hello @NeoBA 

 

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

5 REPLIES 5
Jimmy801
Community Champion
Community Champion

Hello @NeoBA 

 

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

NeoBA
Frequent Visitor

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

 

NeoBA
Frequent Visitor

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

 

Jimmy801
Community Champion
Community Champion

Hello @NeoBA 

 

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

NeoBA
Frequent Visitor

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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Top Kudoed Authors