Generating structured JSON from language models is a challenging task. The generated JSON must be syntactically correct, and it must conform to a schema that specifies the structure of the JSON.
Try it out in a minimal demo: https://josdejong.github.io/jsonrepair/ ...