How Does Ollama's Structured Outputs Work?

Digging into what Ollama is doing under the hood to produce structured outputs