Ole8700 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
1 stars 0 forks source link

JSON interface has inconsitencies with lists of entities #236

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When you use the JSON interface you can't simply parse the result with many 
JSON parsers. This is because in cases where possibly mutliple items are 
returned you get a JSON array in case of multiple items or a single JSON object 
in cases where is only one item in the list.
For example in the demo sitemap 
(http://demo.openhab.org:8080/rest/sitemaps/demo/demo?type=json) we have the 
Frame widget "Weather" which contains only one sub widget as JSON object. The 
frame containing first floor, second floor and so on contains multiple sub 
widgets which are repsented as a JSON array. This error also occurs in the 
sitemap endpoint wether you have one or mutliple sitemaps and probably 
everywhere else (mappings) where you can have lists of objects.

Original issue reported on code.google.com by till.klo...@gmail.com on 12 Apr 2013 at 3:14

GoogleCodeExporter commented 9 years ago

Original comment by kai.openhab on 12 Apr 2013 at 3:41

GoogleCodeExporter commented 9 years ago
Is there a status update for this?
HABSweetie would profit very much from the availability of a working JSON 
interface. This would for one reduce traffic a but, more importantly it would 
allow me switch to another network layer which is faster und supports SPDY.

Original comment by till.klo...@gmail.com on 26 May 2013 at 5:15

GoogleCodeExporter commented 9 years ago
Migrated to https://bugs.eclipse.org/bugs/show_bug.cgi?id=423507

Original comment by kai.openhab on 7 Dec 2013 at 8:57