extract json data to virtual device

I’ve already been able to extract xml data to put value in a virtual device. I checked on the forum with no luck, is there a way to do the same with json. when i put the url in the browser here what it print out:

{“id”:“VideoGetItem”,“jsonrpc”:“2.0”,“result”:{“item”:{“id”:1,“label”:“22. Tis Pity”,“title”:“Tis Pity”,“type”:“episode”}}}

i want the label data and put it in a virtual device.

Thanks in advance
mic

I save JSON data in Vera in the PLTS, PLEG, and PLC plugins.
There is a JSON parser on Vera.

It can’t read all the data it writes!
Others have loaded their own JSON parsing package as part of their plugin.

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require("dump")
> json = require("json")
> a = '{"id":"VideoGetItem","jsonrpc":"2.0","result":{"item":{"id":1,"label":"22. Tis Pity","title":"Tis Pity","type":"episode"}}}'
> b = json.decode(a)
> print(dump(b))
{ ["id"] = VideoGetItem,["jsonrpc"] = 2.0,["result"] = { ["item"] = { ["id"] = 1,["type"] = episode,["title"] = Tis Pity,["label"] = 22. Tis Pity,} ,} ,} 
> 

thanks for the fast reply, maybe i dont understand you right but as soon as i put the b = json.decode(a) in the luup test code, it fail.
what i’m doing wrong?
thanks again