I'm working on a B4J app retrieving Json data from a home control program (Domoticz) for reading status of devices etc. The problem is that Domoticz seems not to save strings in quotes (I think this is the problem?), giving error like :
ERROR: org.json.JSONException: Unterminated object at character 45 of [{HardwareName=ONKYO, LastUpdate=2020-06-28 10:37:23, PlanID=0, PlanIDs=[0], Image=Amplifier, Unit=0, DimmerType=none, MaxDimLevel=100, Name=Onkyo - Master selector, HardwareTypeVal=104, ID=00000008, Status=Set Level: 30 %, Protected=false, SubType=Selector Switch, LevelInt=30, AddjMulti=1.0, LevelActions=T2ZmfDEwfDAxfDAyfDExfDA1fDAzfDI1fDI0fDIzfDEyfDIyfDJifDJl, SwitchType=Selector, AddjMulti2=1.0, Level=30, idx=24, Notifications=false, AddjValue2=0.0, Timers=false, Favorite=1, HaveDimmer=true, Description=, HardwareID=4, XOffset=0, IsSubDevice=false, ShowNotifications=true, HardwareType=Onkyo AV Receiver (LAN), HaveTimeout=false, TypeImg=Light, SelectorStyle=1, BatteryLevel=255, HaveGroupCmd=true, SwitchTypeVal=18, SignalLevel=-, Data=Set Level: 30 %, YOffset=0, LevelOffHidden=true, Type=Light/Switch, UsedByCamera=false, LevelNames=T2ZmfEJEL0RWRHxDQkwvU0FUfEdBTUV8U1RSTSBCT1h8UEN8QVVYfEFNfEZNfENEfFRWfFBIT05PfE5FVHxCT...
I can't figure out how to get round this. Is there another approach to retrieve Json data then jsonparser that would work?
Any help/ideas appreciated
Regards Håkan
ERROR: org.json.JSONException: Unterminated object at character 45 of [{HardwareName=ONKYO, LastUpdate=2020-06-28 10:37:23, PlanID=0, PlanIDs=[0], Image=Amplifier, Unit=0, DimmerType=none, MaxDimLevel=100, Name=Onkyo - Master selector, HardwareTypeVal=104, ID=00000008, Status=Set Level: 30 %, Protected=false, SubType=Selector Switch, LevelInt=30, AddjMulti=1.0, LevelActions=T2ZmfDEwfDAxfDAyfDExfDA1fDAzfDI1fDI0fDIzfDEyfDIyfDJifDJl, SwitchType=Selector, AddjMulti2=1.0, Level=30, idx=24, Notifications=false, AddjValue2=0.0, Timers=false, Favorite=1, HaveDimmer=true, Description=, HardwareID=4, XOffset=0, IsSubDevice=false, ShowNotifications=true, HardwareType=Onkyo AV Receiver (LAN), HaveTimeout=false, TypeImg=Light, SelectorStyle=1, BatteryLevel=255, HaveGroupCmd=true, SwitchTypeVal=18, SignalLevel=-, Data=Set Level: 30 %, YOffset=0, LevelOffHidden=true, Type=Light/Switch, UsedByCamera=false, LevelNames=T2ZmfEJEL0RWRHxDQkwvU0FUfEdBTUV8U1RSTSBCT1h8UEN8QVVYfEFNfEZNfENEfFRWfFBIT05PfE5FVHxCT...
I can't figure out how to get round this. Is there another approach to retrieve Json data then jsonparser that would work?
Any help/ideas appreciated
Regards Håkan