forecastio-lib-java icon indicating copy to clipboard operation
forecastio-lib-java copied to clipboard

In FIODataPoint, fields that are Strings are enclosed by double quotes.

Open BoD opened this issue 9 years ago • 2 comments

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 :)

BoD avatar Jul 16 '16 13:07 BoD

My last commit in the dev branch addresses that issue

dvdme avatar Dec 29 '16 11:12 dvdme

Which release will this be in?

natefoundry avatar Feb 06 '18 17:02 natefoundry