[MDEV-30962] JSON_OBJECT function generates "malformed" JSON with ZEROFILL type Created: 2023-03-29 Updated: 2023-11-28 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.4, 10.11.2, 10.7.8, 10.8.7, 10.9.5, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0 |
| Fix Version/s: | 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Juan Ferrer Toribio | Assignee: | Rucha Deodhar |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
When using the JSON_OBJECT function with ZEROFILL values, "malformed" JSON strings are generated, this occurs because it puts one or more 0s before the number. The JSON MariaDB own's functions fail to parse the string. Ej:
Wich results in:
The same JSON string also fails to parse with native Javascript JSON.parse() function.
|
| Comments |
| Comment by Alice Sherepa [ 2023-04-04 ] | |||||||||||||||||
|
Thank you for the report! I repeated as described on 10.4-10.11:
|