Skip to content

Conversation

@mzegla
Copy link
Collaborator

@mzegla mzegla commented Nov 4, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the JSON parser's handling of escape sequences, specifically when multiple consecutive backslashes precede a quote character. The fix correctly determines whether a quote is escaped by counting consecutive backslashes instead of just checking for a single preceding backslash.

  • Replaced simple single-backslash check with proper consecutive backslash counting logic
  • Added comprehensive test case to verify the fix handles multiple escape sequences correctly

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/llm/io_processing/partial_json_builder.cpp Implements proper escape sequence handling by counting consecutive backslashes
src/test/llm/output_parsers/partial_json_builder_test.cpp Adds test case to verify correct parsing of JSON with multiple escape sequences

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mzegla mzegla force-pushed the fix_partial_json_builder branch from 84ba24a to 09c8328 Compare November 4, 2025 12:30
@mzegla mzegla added this to the 2025.4rc milestone Nov 7, 2025
@mzegla mzegla merged commit 5bc7b5f into main Nov 12, 2025
@mzegla mzegla deleted the fix_partial_json_builder branch November 12, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants