Skip to content

Commit

Permalink
address issue #3779
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Mar 7, 2025
1 parent d812103 commit 96e4038
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core/src/parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ export function parseJSONObjectFromText(

if (jsonBlockMatch) {
text = cleanJsonResponse(text);
const parsingText = normalizeJsonString(text);
// see issue 3779
//const parsingText = normalizeJsonString(text);
try {
jsonData = JSON.parse(parsingText);
jsonData = JSON.parse(text);
} catch (e) {
console.error("Error parsing JSON:", e);
console.error("Text is not JSON", text);
Expand All @@ -161,9 +162,10 @@ export function parseJSONObjectFromText(

if (objectMatch) {
text = cleanJsonResponse(text);
const parsingText = normalizeJsonString(text);
// see issue 3779
//const parsingText = normalizeJsonString(text);
try {
jsonData = JSON.parse(parsingText);
jsonData = JSON.parse(text);
} catch (e) {
console.error("Error parsing JSON:", e);
console.error("Text is not JSON", text);
Expand Down

0 comments on commit 96e4038

Please sign in to comment.