FB_init

Saturday, September 29, 2012

Json.NET + Powershell - short example


( Json.NET from here. )

Example:

[void][system.reflection.assembly]::LoadFrom("E:\install\JsonNetBin\Net35\Newtonsoft.Json.dll")

$json = "{'channel': { 'title': 'James Newton-King' }}"

$rss = [Newtonsoft.Json.Linq.JObject]::Parse($json)

$rssTitle = $rss['channel']['title']

Write-Host $rssTitle.ToString()

-----

Output: James Newton-King

No comments: