json
json copied to clipboard
request to not add newline at the end of any non-object value
I'm using json to fetch string values from json strings for use in APIs. Currently, that requires a manual pipe to tr -d '\n'
echo '{"foo": "bar"}' | json foo
bar
echo '{"foo": "bar"}' | json foo | tr -d '\n'
bar⏎
It would be nice if this extra step was unnecessary.