Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/t-sql/data-types/json-data-type.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
<img width="100" height="19" alt="image" src="https://github.com/user-attachments/assets/97427a9d-b373-460a-a4d7-1bd32ca6fb42" />---
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image tag appears to have been accidentally inserted before the document frontmatter delimiter. This will break the YAML frontmatter parsing. The line should only contain '---'.

Copilot uses AI. Check for mistakes.
title: "JSON Data Type"
description: The native JSON data type provides advantages for storing JSON data over varchar or nvarchar. Learn more about the JSON data type.
author: WilliamDAssafMSFT
Expand Down Expand Up @@ -148,6 +148,15 @@ Currently, the `OPENJSON()` function doesn't accept the **json** data type in so

- 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).

### Size limit for Items in one object/array
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected capitalization of 'Items' to 'items' in the heading for consistency with standard heading capitalization.

Suggested change
### Size limit for Items in one object/array
### Size limit for items in one object/array

Copilot uses AI. Check for mistakes.
The **JSON type** has a size limit of **65,535 items** per object or array — this corresponds to the maximum value of a 16-bit unsigned integer.
If you attempt to cast text into the JSON type and it contains more than 65,535 elements, the following error will be thrown:
Comment on lines +152 to +153
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term 'JSON type' should be consistently formatted as 'json' (lowercase, in code style) to match the formatting used elsewhere in the document when referring to the data type itself.

Suggested change
The **JSON type** has a size limit of **65,535 items** per object or array — this corresponds to the maximum value of a 16-bit unsigned integer.
If you attempt to cast text into the JSON type and it contains more than 65,535 elements, the following error will be thrown:
The **json** data type has a size limit of **65,535 items** per object or array — this corresponds to the maximum value of a 16-bit unsigned integer.
If you attempt to cast text into the **json** data type and it contains more than 65,535 elements, the following error will be thrown:

Copilot uses AI. Check for mistakes.
`Msg 13647, Level 16, State 1, Line 10
Number of items in one object/array exceeds limit 65535 in JSON type.`

The `TRY_CAST` function also throws the same error when this limit is exceeded.


## Related content

- [Store JSON documents](../../relational-databases/json/store-json-documents-in-sql-tables.md)
Expand Down