Skip to content

Instantly share code, notes, and snippets.

@andrioid
Last active August 29, 2015 14:01
Show Gist options
  • Save andrioid/1eb785ecbb9fccd3fde1 to your computer and use it in GitHub Desktop.
Save andrioid/1eb785ecbb9fccd3fde1 to your computer and use it in GitHub Desktop.
JSON creation CLI idea
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"
}
}
}
@andrioid
Copy link
Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment