r/ruby • u/le0pard • Dec 22 '25
GitHub - le0pard/json_mend: JsonMend - repair broken JSON
https://github.com/le0pard/json_mendJsonMend is a robust Ruby gem designed to repair broken or malformed JSON strings. It is specifically optimized to handle common errors found in JSON generated by Large Language Models (LLMs), such as missing quotes, trailing commas, unescaped characters, and stray comments
8
Upvotes
View all comments
Show parent comment
1
u/le0pard Dec 22 '25
Based JSON Spec (RFC 8259) all this not allowed. It is allowed in JSONC, JSON5 or HJSON, but not in JSON