1

When I run this query in Redshift, I would expect json_extract_path_text to remove the backslash from the "\"b\"" value:

select j, json_extract_path_text(j, 'a', true) as a
from (select '{"a": "\\"b\\""}' as j);

Instead, it appears that the string value is extracted verbatim, and the results look like this:

{"a": "\"b\""}
\"b\"

Is this intentional? If yes, what would be the idiomatic way to remove the backslashes?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.