Casting to JSON fails for some values.
Open
bug
json
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 121
Description
MySQL:
```
mysql> select CAST(CURRENT_DATE as JSON);
+----------------------------+
| CAST(CURRENT_DATE as JSON) |
+----------------------------+
| "2023-12-20" |
+----------------------------+
1 row in set (0.00 sec)
```
Dolt:
```
json> select CAST(CURRENT_DATE as JSON);
expression 'convert(current_date(), json)': couldn't convert to json: Invalid JSON text: invalid character '-' after top-level value
```
The expected result, although displayed as a string, is actually a Datetime object wrapped in a JSON document.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.