dolt
dolt copied to clipboard
Casting to JSON fails for some values.
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.