Skip to content

Commit ad45351

Browse files
authored
revert back to original
1 parent a87a01b commit ad45351

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

  • samples/agent/adk/restaurant_finder

samples/agent/adk/restaurant_finder/agent.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import json
1616
import logging
1717
import os
18-
import re
1918
from collections.abc import AsyncIterable
2019
from typing import Any
2120

@@ -227,9 +226,6 @@ async def stream(self, query, session_id) -> AsyncIterable[dict[str, Any]]:
227226
if not json_string_cleaned:
228227
raise ValueError("Cleaned JSON string is empty.")
229228

230-
# Autofix: Remove trailing commas from arrays and objects
231-
json_string_cleaned = re.sub(r",\s*([\]}])", r"\1", json_string_cleaned)
232-
233229
# --- New Validation Steps ---
234230
# 1. Check if it's parsable JSON
235231
parsed_json_data = json.loads(json_string_cleaned)

0 commit comments

Comments
 (0)