Great project, @jpmens .
An easily dismissable feature idea for you;
As with curl and vault, it could be nice to serialize the contents of a file using the @ prefix.
$ jo -p authors=@AUTHORS
"authors": "Jan-Piet Mens <email@example.com>"
Currently I'm using cat, which is fine, honestly.
$ jo -p authors="$(cat AUTHORS)"
I'd thought of doing that (in spite of feature creep :-)
What I don't like about it is that it clashes with my (probably bad) choice of using @ for indicating booleans: this makes my eyes water:
$ jo pass@T authors=@AUTHORS
Let's think about this a bit.
We can already specify boolean with =true so dropping support for @T is easy to fix. The change breaks the backwards compatibility though.
The proposed change doesn't break backward compatibility. Consider the difference:
$ jo bool@T
$ jo file=@AUTHORS
Oh, yes. You are right. Sorry.
@bibby I like this, and it's going to happen with a twist. Stay tuned. 😃
read JSON element values from files
@file is read as is (trailing cr/nl is stripped)
%file is read binary as is and base64-encoded
I look forward to it. jo has saved me quite a bit of time this week.