[MDEV-26679] JSON_VALID validates invalid JSON Created: 2021-09-25 Updated: 2021-09-25 Resolved: 2021-09-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Roel Van de Paar | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Both, at least according to http://json-validator.com/ are invalid. The second is definitely invalid/cannot be valid. |
| Comments |
| Comment by Roel Van de Paar [ 2021-09-25 ] | |||||||||||||||||
|
Also:
| |||||||||||||||||
| Comment by Sergei Golubchik [ 2021-09-25 ] | |||||||||||||||||
|
examples with backslash are no different from empty curly braces:
see https://mariadb.com/kb/en/string-literals/
As far as the empty json {} is concerned, there are two JSON standards, ECMA-404 (https://www.ecma-international.org/publications-and-standards/standards/ecma-404/) and ISO STD 90 (https://www.rfc-editor.org/info/std90). Both agree that {} is a valid json. |