-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add missing limitation information for the JSON data type #10265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jing8956
commented
Jan 14, 2026
|
@jing8956 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 826d741: ✅ Validation status: passed
For more details, please refer to the build report. |
|
@jing8956 Thanks for creating a pull request on Microsoft documentation. This appears to be pretty straightforward, can you explain further why this distinction would be necessary about the json data type? Also, |
|
Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds important documentation about a limitation of the JSON data type in SQL Server 2025. Specifically, it clarifies that only JSON objects and arrays are supported as top-level values, while JSON scalars (strings, numbers), booleans, and null values are not supported at the top level.
Changes:
- Added a new sentence documenting the constraint that JSON data type only accepts objects or arrays as top-level types
- The new limitation is placed in the appropriate Limitations section before the Size limitations subsection
|
|
||
| - In [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)], the `OPENJSON()` function does support **json**. For more information, see [Key JSON capabilities in SQL Server 2025](../../relational-databases/json/json-data-sql-server.md#key-json-capabilities). | ||
|
|
||
| The top-level type must be a JSON Object or a JSON Array. Scalars, booleans, and null values are not supported. |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence uses mixed capitalization for JSON terms. According to JSON specification terminology, "object" and "array" should be lowercase when referring to JSON structural elements, not capitalized. Consider changing "JSON Object" and "JSON Array" to "JSON object" and "JSON array" for consistency with standard JSON terminology.
|
@WilliamDAssafMSFT Sorry for being pretty straightforward. According to the definition in RFC 8259, Text that contains only a value is also a valid JSON. This is very useful for dynamic forms; some forms store complex objects, while others only need to store a single scalar. Ever since MS-SQL introduced a dedicated JSON data type, I have always thought it would be a new solution to completely replace the previous use of varchar or nvarchar for storing JSON data. That was until today, when I failed to store a JSON boolean value in a column with the JSON data type. Based on my actual testing on SQL Server 2025 and Azure SQL, the JSON data type is only a subset of the JSON. Regarding the explanation of 'top-level,', ISJSON (Transact-SQL) has a longer explanation:
If you feel that a longer explanation is needed to clarify this, please feel free to modify my pull request. |
|
Thanks @jing8956 this is a good contribution to the doc. Will bring this commit internally and add to it. This doc flight is in progress. |