New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON-Datapoint not usable in binding #263
Comments
In my case it's not possible to bin JSONs at all. I have tested the following code, it's without try/catch. Maybe it's faster but you have to parse the binding in second step:
Binding Example: {a: json.state; JSON.parse(a)["key"]} For me it doesn't matter. I like your solution, because parsing is not necessary. Unfortunately in both cases is not possible to bind Arrays.
But I got errors in browsers console "type of undefined etc." @oweitman |
@gsicilia82 |
@oweitman Not one Array worked for me. It doesn't matter which one I tested. e.g.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Please open a new issue if still relevant and make sure to include all relevant details, logs and reproduction steps. Thank you for your contributions. |
is is not possibe to use a JSON-String in a binding operation if the JSON contains douple quotaition marks.
Example:
-create a basic HTML widget and following binding in HTML-property: {a:javascript.0.json;console.debug(a)}
if you change the datapoint to [{'a':1},{'a':2}]
it works.
if you request json data from external services it is not easy to change all doupe quotation marks to singel quotation marks
a possible solution is to test the string for valid JSON-Data (this includes also number, false,true) as follows:
2 if the Test fails, add Data with quotaion marks. (strings)
affected code
ioBroker.vis/www/js/vis.js
Line 2377 in 4eed0e9
The text was updated successfully, but these errors were encountered: