When using ipfs dag put - Error: selected encoding not supported

I get the following error when trying to convert a json into a hash value and store it in a .hash file, could anyone help me out? would it be worth updating IPFS?

cat wordalg.json | ipfs dag put > word-task.hash
Error: selected encoding not supported

its to run a task in computes.io

This discussion was moved to https://github.com/ipfs/go-ipfs/issues/4496#issuecomment-404667854.