You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
For instance, dataPoint.icon() will not return partly-cloudy-day but "partly-cloudy-day".
This is because of the way the void update(JsonObject dp) method is coded.
This takes all the fields in the Json object and puts it in a map, like this: datapoint.put(dp.names().get(i), dp.get(dp.names().get(i))).
The problem is dp.get() returns JsonNumber, JsonString, etc. depending on the type of the field, and JsonString.toString() returns the value as Json code. And the Json representation of a String is its value enclosed by double quotes :)
The text was updated successfully, but these errors were encountered:
For instance,
dataPoint.icon()
will not returnpartly-cloudy-day
but"partly-cloudy-day"
.This is because of the way the
void update(JsonObject dp)
method is coded.This takes all the fields in the Json object and puts it in a map, like this:
datapoint.put(dp.names().get(i), dp.get(dp.names().get(i)))
.The problem is
dp.get()
returnsJsonNumber
,JsonString
, etc. depending on the type of the field, andJsonString.toString()
returns the value as Json code. And the Json representation of a String is its value enclosed by double quotes :)The text was updated successfully, but these errors were encountered: