As described in nix-community/home-manager#4313 (comment)
Problem is easy to reproduce:
aya$ echo "export tEsT='mult
iline'"| bash-env-json
jq: parse error: Expected separator between values at line 2, column 7
and it is because of this:
aya$ echo -n 'mult
iline'| jq -R
"mult"
"iline"
which is easy to fix:
aya$ echo -n 'mult
iline'| jq -Rs
"mult\niline"