Update
I noticed that I am able to pass JSON with this command
command -j /dev/stdin <<< '{"key":"value"}'
However, it does not work if I call it through SSH.
ssh {target} 'command -j /dev/stdin <<< '{"key":"value"}''
Looks like it send through as a string and not JSON? Anyone have any idea why?
I have a command where I need to pass a JSON string to the options but for some reasons I need it to be passed using herestring to /dev/stdin.
Example
command -j /dev/stdin <<< '{"key":"value"}'
'beforecommandthat is closed after<<<```. I think you need to use\'`` after<<<and after"value"}. Otherwise you close the ssh single quotes at the first inner single quote and open it again at the second one.