Bug #78736 | Shorthand JSON_UNQUOTE(JSON_EXTRACT(..)) operator | ||
---|---|---|---|
Submitted: | 7 Oct 2015 14:18 | Modified: | 2 May 2016 8:29 |
Reporter: | Morgan Tocker | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: JSON | Severity: | S4 (Feature request) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[7 Oct 2015 14:18]
Morgan Tocker
[12 Oct 2015 4:18]
MySQL Verification Team
Hello Morgan, Thank you for the feature request! Regards, Umesh
[2 May 2016 8:29]
Jon Stephens
Fixed in 5.7.13 / 5.8.0.
[2 May 2016 10:06]
Jon Stephens
Documented feature addition in the 5.7 Manual, and in the 5.7.13 changelog as follows: This release adds an unquoting extraction operator ->>, sometimes also referred to as an inline path operator, for use with JSON documents stored in MySQL. The new operator is similar to the -> operator, but performs JSON unquoting of the value as well. For a JSON column mycol and JSON path expression mypath, the following three expressions are equivalent: + JSON_UNQUOTE( JSON_EXTRACT(mycol, "$.mypath") ) + JSON_UNQUOTE(mycol->"$.mypath") + mycol->>"$.mypath" The ->> operator can be used in SQL statements wherever JSON_UNQUOTE(JSON_EXTRACT()) would be allowed. This includes (but is not limited to) SELECT lists, WHERE and HAVING clauses, and ORDER BY and GROUP BY clauses. For more information, see Functions That Search JSON Values (http://dev.mysql.com/doc/refman/5.7/en/json-search-functions.html), and JSON Path Syntax (http://dev.mysql.com/doc/refman/5.7/en/json-path-syntax.html).