> There is promise in constraining output to be valid JSON. One new trick that the open-source llama.cpp project has popularized is generative grammars
This has been working for months now and is the best method for this type of stuff, a thing for moat-lovers. Too bad it wasn't explored here, the text-based methods turned out to be mainly an unreliable waste of time.