Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.15
Description
certain escaped unicode in json failes to parse, for example a smiley emoji:
SET @str = "{\"value\":\"\\ud83d\\ude0a\"}"; |
SET @path = "$.value"; |
select @str, @path, JSON_value(@str, @path); |
+--------------------------+---------+-------------------------+
|
| @str | @path | JSON_value(@str, @path) | |
+--------------------------+---------+-------------------------+
|
| {"value":"\ud83d\ude0a"} | $.value | NULL | |
+--------------------------+---------+-------------------------+
|
however this seems to work
SET @str = "{\"value\":\"\\u00e4\\u00f6\"}"; |
SET @path = "$.value"; |
select @str, @path, JSON_value(@str, @path); |
+--------------------------+---------+-------------------------+
|
| @str | @path | JSON_value(@str, @path) | |
+--------------------------+---------+-------------------------+
|
| {"value":"\u00e4\u00f6"} | $.value | äö | |
+--------------------------+---------+-------------------------+
|
Attachments
Issue Links
- relates to
-
MDEV-21124 JSON_UNQUOTE fails to process surrogate pairs
- Confirmed