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 | รครถ |
|
+--------------------------+---------+-------------------------+
|