[dss-developer] A problem about JSON analysis

Hofmann, Christoph christoph.hofmann at aizo.com
Tue Sep 14 08:17:33 CEST 2010


Hi Chen,

google is your friend! Please try to use the internet to learn programming and parsing JSON strings. We have a lot of work with our new open source dSS software and can not support our old versions nor can give private lessons in how to use javascript or Xcode.

By the way: Our dS Taster app in the AppStore is not open source at this time.


Best regards
Christoph



Von: dss-developer-bounces at forum.digitalstrom.org [mailto:dss-developer-bounces at forum.digitalstrom.org] Im Auftrag von Xue Chen
Gesendet: Dienstag, 14. September 2010 07:50
An: dSS development list
Betreff: [dss-developer] A problem about JSON analysis

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<mailto:xuechen628 at googlemail.com>



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


More information about the dss-developer mailing list