❯ yq --version
yq (https://github.com/mikefarah/yq/) version v4.48.1
❯ yq -n '.foo = "a\tb"'
foo: a\tb
The output is not correct; backslash escapes only work inside double-quoted strings. The output should have been:
❯ yq -n '.foo = "a\tb"'
foo: "a\tb"