|
|
|
|
|
by simonw
718 days ago
|
|
I found the JSON array syntax a little unintuitive: $ jb dependencies:[,]=Bash,Grep
{"dependencies":["Bash","Grep"]}
One possible alternative would be to accept JSON literal snippets, like this: $ jb dependencies='["Bash", "Grep"]'
This should support all forms of nested JSON objects. You could have a rule that if an argument does NOT parse as a valid JSON value it is treated as a raw string, so this would work: $ jb foo=bar bar='"this is a well formed string"'
{"foo": "bar", "bar": "this is a well formed string"}
You could even then nest jb calls like this: $ jb foo=$(jb bar=baz)
{"foo": {"bar": "baz}}
|
|