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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Fsrodrigues
Regular Visitor

We found extra characters at the end of the JSON input - Get Data from Azure devOps

Dear all,

 

I have a query that is working on Power BI Desktop, but when a publish it and try to refresh it, I am facing the error bellow.

 

DataFormat.Error: <ccon>We found extra characters at the end of the JSON input.. Value = <. Position = 4. </ccon>. The exception was raised by the IDbCommand interface. 

 

The query is:

 

( testPlanId as text) =>

let
NextResult = (testPlanId as text, token) =>
let

relativePath = "/Org/Proj/_apis/testplan/Plans/" & testPlanId & "/suites?expand=children?api-version=7.0",

relativePathWithContinuation =
if token = null then
relativePath
else
relativePath & "&continuationToken=" & Number.ToText(token) & ";0",

Content = Web.Contents(TFSUrl,[RelativePath=relativePathWithContinuation]),
AsJson = Json.Document(Content)[value],
continuationToken = ReturnLastId(Content),
//continuationToken = Value.Metadata(Content)[Headers][#"x-ms-continuationtoken"]?,
Result =
if continuationToken = null then
AsJson
else
AsJson & @NextResult(testPlanId,continuationToken)
in
Result,

GetTestSuitesForPlan= NextResult(testPlanId,null)

in
GetTestSuitesForPlan

 

 

Can anyone help, please?

Is there an aditional string I have to add in the query so it will work in Power BI Service as good as it works  in desktop?

 

3 REPLIES 3
v-yueyunzh-msft
Community Support
Community Support

Hi , @Fsrodrigues 

According to my search and research on the error you provided, if your output is a multi-dimensional JSON file, you can try adding [ at the beginning, ] at the end, and after every line, and for other possibilities of this problem, you can also refer to these related cases:

Solved: "We found extra characters at the end of JSON inpu... - Power Platform Community (microsoft....

Get authorization code in JSON format - Microsoft Power BI Community

Solved: We found extra characters at the end of the JSON i... - Microsoft Power BI Community

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi v-yueyunzh-msft,

 

Thank you for your response.

 

I don't understand your point with 'adding [ at the beginning, ] at the end, and after every line', could you please explain me?

Hi Fsrodrigues,

I know it's an old thread, but did you find a solution here?

Because I'm running in the same problem and the web is not really helpfull.

 

Best regards!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors