adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Title: ADK Intermittent JSON Parsing Error - "Expected ',' or '}' after property value"

Open ggae2 opened this issue 1 year ago • 2 comments

Problem Description I encountered intermittent JSON parsing errors when integrating a frontend application with an ADK agent backend. The ADK agent would sometimes return malformed JSON that couldn't be parsed by the frontend, specifically when using visualization tools. Error Details:

Expected ',' or '}' after property value in JSON at position ~4069 Unexpected token 'T', ..."useGeodata": True, "val"... is not valid JSON Error occurred in ADK's stateDelta.visual_result field responses

Architecture:

Backend: ADK Agent (Python) running on adk api_server Frontend: React/Vite app consuming ADK /run endpoint Issue: JSON responses from ADK agent contained somettimes Python formatting instead of valid JSON

Symptoms

Intermittent behavior: Same visualization request would work sometimes, fail other times Python vs JSON format: ADK responses contained someties True/False instead of true/false

anyone had similare issue

ggae2 avatar Jul 19 '25 23:07 ggae2

I am going to transfer this adk-python repo since it's model related. But are you seeing this from model responses? Sometime if you say it explicitly in the prompt that you want "mark down" format or "json" format, this will be resolved.

I could not reproduced this consistently.

wyf7107 avatar Aug 15 '25 04:08 wyf7107

I believe this is a model issue. Please check raw logs to see if it's related to ADK or not. Closing now.

hangfei avatar Oct 28 '25 20:10 hangfei