Skip to content

Conversation

@lauxjpn
Copy link
Collaborator

@lauxjpn lauxjpn commented Mar 21, 2024

We will use JSON_VALUE() for scalar JSON values from now on, because it seems to handle null values correctly.

JSON_EXTRACT() will return a string with the contents of null for a JSON null value instead of a SQL NULL value (see Bug #85755: JSON containing null value is extracted as a string "null").

So when we have to depend on JSON_EXTRACT(), we have to explicitly check for that specific case to ensure that the expected value is returned.

Fixes #1897

@lauxjpn lauxjpn added type-bug backport-candidate Should be considered for backporting. labels Mar 21, 2024
@lauxjpn lauxjpn added this to the 9.0.0-preview.2 milestone Mar 21, 2024
@lauxjpn lauxjpn self-assigned this Mar 21, 2024
@lauxjpn lauxjpn modified the milestones: 9.0.0, 10.0.0 Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-candidate Should be considered for backporting. type-bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace JSON_EXTRACT utilisation with JSON_VALUE

1 participant