Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.3.15
-
Component/s: JSON
-
Labels:
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
-
- Open
-