Smarteon / loxone-java

Java implementation of the Loxone™ communication protocol (Web Socket)
BSD 3-Clause "New" or "Revised" License
15 stars 10 forks source link

Convert Textevent to room favourites #21

Open hpposch opened 6 years ago

hpposch commented 6 years ago

Hi,

i just saw that in the TextEvents i also get the room favourites. Now i want to convert them to a class, but i can not get this working. Can someone please help me to deserialize the following text to a java class.:

TextEvent{uuid=1121d919-02b0-e821-ffff44ee4e487b2e, iconUuid=00000000-0000-0000-0000000000000000, text='{ "getroomfavs_result": [ {"id": 2, "type":4, "totalitems":6, "start":0, "items": [ { "slot": 1, "name": "Hitradio Ö3 (Wien)" }, { "slot": 2, "name": "Radio FM4 (Wien)" }, { "slot": 3, "name": "ORF Radio Steiermark (Steiermark)" }, { "slot": 4, "name": "Clasic Radio Beethoven" }, { "slot": 5, "name": "Antenne Steiermark" }, { "slot": 6, "name": "ANTENNE BAYERN" } ] } ], "command":"audio/cfg/getroomfavs/2/0/10" }'}

This is the complete class, only the content of 'text' must be deserialized. Thanks in advance :)

hpposch commented 6 years ago

Ok i already found a online converter. So this one is solved ;)

jimirocks commented 6 years ago

Well in the future this library could support all the loxone structures, so le'ts keep this as feature request