mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-02 10:31:04 +08:00
Extends fixMissingQuotes() to replace fullwidth brackets, colons, and commas that Claude AI occasionally outputs, preventing JSON parsing failures.
Root cause: AI can output fullwidth characters like [{:, instead of [{ :,
Error: "JSON 必须以 [{ 开头,实际: [ {"symbol": "BTCU"
Fix: Replace all fullwidth JSON syntax characters:
- [] (U+FF3B/FF3D) → []
- {} (U+FF5B/FF5D) → {}
- : (U+FF1A) → :
- , (U+FF0C) → ,
Test case:
Input: [{\"symbol\":\"BTCUSDT\",\"action\":\"open_short\"}]
Output: [{\"symbol\":\"BTCUSDT\",\"action\":\"open_short\"}]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>