- New XML is JSON.
- Conceptually similar to XML support.
- FOR JSON clause.
ISJSON()
: validates for well-formed JSON string. Can be used as CHECK CONSTRAINT
.OPENJSON:
transforms JSON text to tableJSON_QUERY:
queries by path expression and returns a nested arrayJSON_VALUE:
queries by path expression and returns a scalar valueLimitations
- No native "json" data type => use nvarchar(max).
- No custom JSON index => create computed columns over desired properties, and then index the computed columns.
- No JSON "DML": cannot directly modify JSON content. Use string functions for manipulation.