How to parse a JSON file to variables with the windows command line?
If you use Windows Powershell as your command line, you can use the ConvertFrom-JSON
cmdlet: http://powershelljson.codeplex.com/
Make sure your PowerShell version is above 3.0, as ConvertFrom-JSON is available from that version.
If you use plain old CMD, you'll need an external tool for it. I like jq: http://stedolan.github.io/jq/. The tutorial uses curl
for the examples, but you can just as easily use echo
or read the JSON from a file.