Last active
August 29, 2015 14:01
-
-
Save andrioid/1eb785ecbb9fccd3fde1 to your computer and use it in GitHub Desktop.
JSON creation CLI idea
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I needed to make a Bash script talk to a RESTish service today. | |
Found a bunch of JSON parsing tools, but no creation tools. | |
I wanted this. Does it make sense? | |
jc -all.your.base=moo -all.your.cows=beef,burger | |
{ | |
all: { | |
your: { | |
cows: ["beef", "burger"] | |
base: "moo" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Occurs to me that complex JSON documents might best be defined in a template. Then parsed via stdin and manipulated from there. But then I might just use JQ, hmmm :)