Symptom
A valid UTF-8 JSON file loaded through the RAG JSONLoader comes back unparsed, with parse_error set in its metadata.
Evidence what you'll see
- metadata["parse_error"] is set
- The content still starts with the BOM character
- The same JSON without a BOM loads fine
Cause
Local files were opened with plain utf-8 decoding, which keeps the leading byte order mark, and json.loads rejects it.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
Verify the fix worked
- Load the same file again and confirm parse_error is gone and the content is parsed.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it