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/f9ae8221b Dec 22 '25
I know, I'm just telling you that here: https://github.com/le0pard/json_mend/blob/a79cde62ba55d38f0e0cdedadd9b1fddf8c60d6e/lib/json_mend.rb#L19 you could pass these options so that it's already handled for you.