Working with JSON in T-SQL: FOR JSON, OPENJSON, JSON_VALUE, JSON_QUERY, JSON_MODIFY and Indexable JSON
FOR JSON PATH turns a query result into nested JSON and OPENJSON ... WITH turns JSON into typed rows; JSON_VALUE quietly returns NULL in lax mode for values over 4000 characters. With real output: an order document in one query, 2033-character FOR JSON chunks, the JSON_MODIFY escaping trap, writing a cart JSON in one round trip, a computed column index and the 2025 JSON index.
15 Nov 2026
·
17 min
·
8