[dss-developer] A problem about JSON analysis

Xue Chen xuechen628 at googlemail.com
Tue Sep 14 07:49:30 CEST 2010


Dear digitalSTROM team,

I have a problem about JSON analysis, now I can get the structure of digitalSTROM installation as a JSON string through "http://192.168.0.10/api/basic?class=0&function=0", it is like this:

({"Name":"","Mac":"00_30_56_90_12_FFD7","orangeEnergyLevel":0,"redEnergyLevel":0,"Zone":[ {"Name":"dSK20 004","ID":585,"Groups":[ {"Name":"BROADCAST","type":0,"lastScene":-1,"ID":0},{"Name":"LIGHT","type":0,"lastScene":-1,"ID":1},{"Name":"SHADOW","type":0,"lastScene":-1,"ID":2},{"Name":"CLIMATE","type":0,"lastScene":-1,"ID":3},{"Name":"MUSIC","type":0,"lastScene":-1,"ID":4},{"Name":"VIDEO","type":0,"lastScene":-1,"ID":5},{"Name":"SECURITY","type":0,"lastScene":-1,"ID":6},{"Name":"ACCESS","type":0,"lastScene":-1,"ID":7},{"Name":"JOKER","type":0,"lastScene":-1,"ID":8},{"Name":"WHITE","type":0,"lastScene":-1,"ID":9},{"Name":"DISPLAY","type":0,"lastScene":-1,"ID":10}]},{"Name":"dSK20","ID":586,"Groups":[ {"Name":"BROADCAST","type":0,"lastScene":-1,"ID":0},{"Name":"LIGHT","type":0,"lastScene":5,"ID":1},{"Name":"SHADOW","type":0,"lastScene":48,"ID":2},{"Name":"CLIMATE","type":0,"lastScene":48,"ID":3},{"Name":"MUSIC","type":0,"lastScene":48,"ID":4},{"Name":"VIDEO","type":0,"lastScene":48,"ID":5},{"Name":"SECURITY","type":0,"lastScene":48,"ID":6},{"Name":"ACCESS","type":0,"lastScene":48,"ID":7},{"Name":"JOKER","type":0,"lastScene":48,"ID":8},{"Name":"WHITE","type":0,"lastScene":48,"ID":9},{"Name":"DISPLAY","type":0,"lastScene":48,"ID":10}]}],"Circuit":[ {"Name":"dsm10 (c)aizo.ag","dSID":"3504175fe000001000000249","dSAdr":0,"orangeEnergyLevel":20,"redEnergyLevel":50,"Devices":[ {"Name":"SD 2","dSID":"3504175fe000000000000a3c","dSAdr":896,"ZoneID":586,"FID":{"Class":1,"SubClass":0,"Function":40},"lastScene":-1,"GroupMembership":[ 0,1]},{"Name":"Taster","dSID":"3504175fe000000000001ace","dSAdr":899,"ZoneID":586,"FID":{"Class":1,"SubClass":0,"Function":2},"lastScene":-1,"GroupMembership":[ 0,1]},{"Name":"ESL","dSID":"3504175fe000000000001693","dSAdr":900,"ZoneID":586,"FID":{"Class":1,"SubClass":0,"Function":40},"lastScene":-1,"GroupMembership":[ 0,1]},{"Name":"SD 1","dSID":"3504175fe000000000000a5c","dSAdr":898,"ZoneID":586,"FID":{"Class":1,"SubClass":0,"Function":40},"lastScene":-1,"GroupMembership":[ 0,1]}]}]})  

How can I get the device information from this JSON-String, I have tried many times, but it is always failed... How can I analyze this JSON-String?

Thank you very much for your help and best regards!! 


Xue Chen
xuechen628 at googlemail.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum.digitalstrom.org/pipermail/dss-developer/attachments/20100914/cae901c8/attachment.htm>


More information about the dss-developer mailing list