Manic Star (9/10/2015)
Jeff Moden (9/9/2015)
Manic Star (9/9/2015)
JSON is evil incarnate. XML's bastard sibling at best.😀
I LOVE IT! A kindred spirit!!!! 🙂
My first encounter with it was someone sending me a data feed in it. They said it was 'like xml'.
One large powershell script later to read the thing and stuff its contents into a staging database, I was cursing it. Then I had an epiphany, it has 'java' in its name, we all know who pushes Java on the world, and that is the master bastion of evil and decrepitude.
.
JSON is extremely easy to consume in PowerShell. Lets say you have the JSON values in a string variable named $jsonData. You can convert it to a PowerShell object by simply using the convertfrom-json command (https://technet.microsoft.com/en-us/library/hh849898.aspx).
$myObj = ConvertFrom-Json $jsonData
Done...