Skip to content

fix(utils): extract_json keeps "None" inside string values - #700

Open
NeyraLabs wants to merge 1 commit into
VectifyAI:mainfrom
NeyraLabs:fix/extract-json-none-in-strings
Open

NeyraLabs wants to merge 1 commit into
VectifyAI:mainfrom
NeyraLabs:fix/extract-json-none-in-strings

Conversation

@NeyraLabs

Copy link
Copy Markdown

utils.extract_json replaces every None with null before parsing, so text inside string values changes too:

extract_json('{"title": "None of the Above", "physical_index": None}')
# before: {'title': 'null of the Above', 'physical_index': None}
# after:  {'title': 'None of the Above', 'physical_index': None}

The standard indexing path relies on it (page_index_classic.py calls it eight times), so a section titled "None of the Above" got a corrupted title in the tree.

The fix replaces only a bare None token outside string literals and respects escaped quotes. tests/test_extract_json.py adds three cases; two fail before the fix. Full suite: 1107 passed, 180 skipped (Python 3.14).

🤖 Generated with Claude Code

…nside strings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants