Skip to content

Commit

Permalink
Merge pull request #32784 from WilliamDAssafMSFT/20250107-json
Browse files Browse the repository at this point in the history
20250107 json
  • Loading branch information
prmerger-automator[bot] authored Jan 7, 2025
2 parents 333e32c + 1b5fccf commit 676f350
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/t-sql/functions/json-modify-transact-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: JSON_MODIFY updates the value of a property in a JSON string and re
author: WilliamDAssafMSFT
ms.author: wiassaf
ms.reviewer: jovanpop, randolphwest
ms.date: 11/04/2024
ms.date: 01/07/2025
ms.service: sql
ms.subservice: t-sql
ms.topic: reference
Expand Down Expand Up @@ -71,7 +71,7 @@ A JSON path expression that specifies the property to update.

The new value for the property specified by *path*.

The new value must be **varchar**, **nvarchar**, or **text**.
The new value must be **varchar**, **nvarchar**, **char**, **tinyint**, **smallint**, **int**, **bigint**, **bit**, **decimal**/**numeric**, or **real**/**float**. The **text** data type is not supported.

In lax mode, `JSON_MODIFY` deletes the specified key if the new value is `NULL`.

Expand All @@ -92,7 +92,7 @@ The following table compares the behavior of `JSON_MODIFY` in lax mode and in st
| `NOT NULL` | Yes | Update the existing value. | Update the existing value. |
| `NOT NULL` | No | Try to create a new key-value pair on the specified path.<br /><br />This might fail. For example, if you specify the path `$.user.setting.theme`, `JSON_MODIFY` doesn't insert the key `theme` if the `$.user` or `$.user.settings` objects don't exist, or if settings is an array or a scalar value. | Error - INVALID_PROPERTY |
| `NULL` | Yes | Delete the existing property. | Set the existing value to null. |
| `NULL` | No | No action. The first argument is returned as the result. | Error - INVALID_PROPERTY |
| `NULL` | No | No action. The first argument is returned as the result. | Error - `INVALID_PROPERTY` |

In lax mode, `JSON_MODIFY` tries to create a new key:value pair, but in some cases it might fail.

Expand Down
4 changes: 2 additions & 2 deletions docs/t-sql/functions/json-path-exists-transact-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: JSON_PATH_EXISTS tests whether a specified SQL/JSON path exists in
author: WilliamDAssafMSFT
ms.author: wiassaf
ms.reviewer: randolphwest, umajay, jovanpop
ms.date: 12/16/2024
ms.date: 01/07/2025
ms.service: sql
ms.subservice: t-sql
ms.topic: reference
Expand Down Expand Up @@ -49,7 +49,7 @@ The `JSON_PATH_EXISTS` function doesn't return errors.

### Example 1

The following example returns 1 since the input JSON string contains the specified SQL/JSON path.
The following example returns 1 since the input JSON string contains the specified SQL/JSON path. This example uses a nested path where the key is present in another object.

```sql
DECLARE @jsonInfo AS NVARCHAR (MAX);
Expand Down

0 comments on commit 676f350

Please sign in to comment.