yq
yq copied to clipboard
xq: Bug with --slurpfile?
Hi;
This example generates half xml/half internal-format output:
cat << 'EOF' > a.json
[ { "copy": { } } ]
EOF
xq -x --xml-root=a --slurpfile a a.json '$a' <<< '<a/>'
<a>[OrderedDict([('copy', OrderedDict())])]</a>
I'm guessing --slurpfile a a.json has a bug, because replacing it with --argjson a "$(cat a.json)" works as expected.
Thanks for the fine program! :-)