JSON Mode
JSON mode is an interface feature intended to produce valid JSON. It differs from structured output constrained to specified fields and types. Mistral documentation describes a JSON-object mode and recommends explicitly requesting JSON in the prompt.
Valid JSON is not a data contract
Both examples are valid JSON:
{"total": 125, "currency": "CNY"}
{"message": "Amount unavailable"}
Only the first supplies the expected invoice fields; even its amount could lack evidence.
Engineering recommendations
Check request and generation completion, parse JSON, validate required fields and types, then verify evidence and business rules. Represent missing information explicitly. Bound retries and return actionable failures.
For fixed production contracts, consider supported schema constraints while retaining application validation. Check current provider documentation rather than copying another API's parameters.
When to use it
JSON mode can simplify parsing when fields are flexible and validation already exists. Database writes, access decisions, and tool execution still require evidence and authorization.
See structured output, function calling, and hallucination.