I am not able to extract quoted strings using JSON_EXTRACT function in MySQL 5.7.
Sample input:
{
"email": "d'souza@email.com",
"body": "I may have "random quotes '(single)/(double)" " in my source data"
}
Tried using,
SELECT
@valid_source := JSON_VALID(jsonString), NULL
IF(@valid_source, JSON_UNQUOTE(JSON_EXTRACT(jsonString, "$.email")), NULL)
I get an error stating: Invalid JSON text in argument 1 to function json_extract: "Missing a closing quotation mark in string." at position xxx
Any help will be appreciated, thanks!