mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-02 18:41:01 +08:00
## Problem
AI occasionally outputs fullwidth (全角) characters in JSON responses,
causing JSON parsing failures even though content is logically correct.
Example error:
JSON format validation failed: actual [ {"symbol": "BTCU...
(displays as fullwidth: [{"symbol":"BTCU...)
## Root Cause
Claude API can output fullwidth characters when:
- Processing Chinese context
- Mixing languages in responses
- Input method artifacts
## Current Protection
Already handles curly quotes but not brackets/punctuation
## Solution
Extend fixMissingQuotes() to handle fullwidth JSON syntax:
- Brackets: [] -> []
- Braces: {} -> {}
- Colon: : -> :
- Comma: , -> ,
## Impact
- Prevents intermittent JSON parsing failures
- No performance impact (simple string replace)
- Does not affect correctly formatted responses
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 lines
0 B
Plaintext
0 lines
0 B
Plaintext
The file is empty.