[MDEV-29161] Non-standard syntaxe for JSON_OBJECT function Created: 2022-07-24 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jose F | Assignee: | Rucha Deodhar |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux Mint 20.3 (Una) |
||
| Description |
|
MariaDB has a non-standard syntaxe for JSON_OBJECT, and also does not accept the standard syntaxe (as defined in ISO/IEC 9075:2016): Example 1:
MariaDB Result: {"last_name": "Doe", "first_name": "John"}MySQL Result: {"last_name": "Doe", "first_name": "John"}Example 2:
MariaDB Result: not works (You have an error in your SQL syntax)
MariaDB Result: not works (You have an error in your SQL syntax) It would be nice to have MariaDB support the standard json_object syntaxe. https://github.com/h2database/h2database/issues/3575 |
| Comments |
| Comment by Sergei Golubchik [ 2022-07-24 ] |
|
you and H2 guys are right, the standard syntax is with a colon ':', not with a comma ','. I agree that we should support the standard syntax. As for key/value variant — I wasn't able to find it in the standard. Can you point out where the 2016 standard says that? Part, section, subsection, etc? |
| Comment by Jose F [ 2022-07-25 ] |
|
Hi, |