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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Data Format .Error: We found extra characters at the end of JSON input.

Hi,

I am trying to fetch data from web using api using this format

 

let
    Source = Json.Document(
        Web.Contents(
            "https://dev.azure.com/{organization}/{project}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}?api-version=6.0"
        )
    ),
    #"Converted to Table" = Table.FromRecords({Source})
in
    #"Converted to Table"

 

but its giving an error

 

DataFormat.Error: We found extra characters at the end of JSON input.
Details:
Value=
Position=4

 

can anyone help me out

1 ACCEPTED SOLUTION
Anonymous
Not applicable

It is responding I have checked through web.browsercontains . Prolem has solved by using header and bearer token in it. thanks for the reply.

View solution in original post

7 REPLIES 7
mtembhurne
Regular Visitor

can u explain how did you resolve it what is "Prolem has solved by using header and bearer token in it."

Vinayak21
New Member

Hello,
I am also try to extract data from same azure rest API "https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationI...  facing same issue , could you please provide more details information on this.

Thanks

MiguelRodrigues
Regular Visitor

Hello,
Can you please share how the code should look like?
I'm getting the same errors with below code:
let
Source = Json.Document(Web.Contents("link")),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", {"fields"})
in
#"Expanded Column1"

Error message:
DataFormat.Error: We found extra characters at the end of JSON input.
Details:
Value=
Position=5

Anonymous
Not applicable

Hi,

  1. try to check the java code in sublime or any other compiler. There must be an extra "," or other things to join the existing code which you have to understand and remove to get in the data.
  2. firstly check with using wer content then convert it to json. This step will let you know if your credentials are working or not. if its not working then use headers and add authentication and token.

These things I will suggest you for now.

 

Syndicate_Admin
Administrator
Administrator

Hello 

miguel
Community Admin
Community Admin

Hey!

 

Probably the response that you're getting from the API is not a valid JSON.

 

Try converting your query to the one below and then read the file as a TXT document by right clicking the binary icon and reading it as a TXT / CSV:

let
    Source = Web.Contents(
            "https://dev.azure.com/{organization}/{project}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}?api-version=6.0"
        )
in
    Source 

You need to determine if the response is a valid JSON or not. 

Anonymous
Not applicable

It is responding I have checked through web.browsercontains . Prolem has solved by using header and bearer token in it. thanks for the reply.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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