You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
With or without a CAST JSON_EXTRACT doesn't accept JSON as a string, e.g.:
you should be able to call JSON_EXTRACT('[1, 2, 3]', '$.[0]') but it returns a NULL.
For '$' argument it returns the first parameter as a string, otherwise NULL.
The text was updated successfully, but these errors were encountered:
Fixessrc-d#709
When a string containing JSON (e.g. `{"a": 1, "b": true}`) is passed
to JSON.Convert, it only did `json.Marshal`, so it was marshalled as
a string (e.g. `"{\"a\":1,\"b\":true}"`), which made it impossible
to use a string with JSON_EXTRACT, which would only receive the
string.
Now, JSON.Convert does a first check for strings. If it can be
unmarshalled into JSON, then that JSON is marshalled and returned.
Otherwise, it's a string and marshalled as such.
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
With or without a CAST
JSON_EXTRACT
doesn't accept JSON as a string, e.g.:you should be able to call
JSON_EXTRACT('[1, 2, 3]', '$.[0]')
but it returns a NULL.For '$' argument it returns the first parameter as a string, otherwise NULL.
The text was updated successfully, but these errors were encountered: