From 00bc20018d5fe85a05b7ced6feb1061f993f897f Mon Sep 17 00:00:00 2001 From: Benjamin Petersen <101329882+bpp-incom@users.noreply.github.com> Date: Tue, 4 Nov 2025 09:21:34 +0100 Subject: [PATCH] Update json-data-type.md --- docs/t-sql/data-types/json-data-type.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/t-sql/data-types/json-data-type.md b/docs/t-sql/data-types/json-data-type.md index b525e566748..28df5e37fe9 100644 --- a/docs/t-sql/data-types/json-data-type.md +++ b/docs/t-sql/data-types/json-data-type.md @@ -1,4 +1,4 @@ ---- +image--- 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 @@ -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 +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: +`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)