From customer report:
postgres=> SELECT '{"v":"a\\nb"}'::jsonb;
e'{"v":"a\\\\nb"}'
--------------------
{"v": "a\ +
b"}
(1 row)
postgres=> SELECT $${"v":"a\\nb"}$$::jsonb;
e'{"v":"a\\\\nb"}'
--------------------
{"v": "a\ +
b"}
(1 row)
postgres=> SELECT $${"v":"a\\\nb"}$$::jsonb;
e'{"v":"a\\\\\\nb"}'
----------------------
{"v": "a\\nb"}
(1 row)
Compare to postgres output:
# SELECT '{"v":"a\\nb"}'::jsonb;
e'{"v":"a\\\\nb"}'
jsonb
----------------
{"v": "a\\nb"}
(1 row)
From customer report:
Compare to postgres output: