Because SODA returns SODA Doubles as JSON strings, the FromJSON parsing of those fields into Haskell's Doubles breaks and returns nothing. You also can't override an already declared instance for a specific type, which means we can't write a new instance FromJSON instance for Double to be like SodaNum's instance. This means that right now, the interpreted responses just don't contain Double values (it's been a while since I tested, so I can't remember if that's exactly what happens).
I actually haven't seen too many datasets with the Double type, but this is still a pretty big issue. The only solution that I can think of right now would be to change the Double type into a newtype like SodaNum and Money. Having to deal with the newtype for those types is already pretty annoying though, and it seems like you should be able to use a basic datatype in an easier way. If there's no other way though, then I guess we'll have to do it to make responses work correctly.
Because SODA returns SODA
Double
s as JSON strings, theFromJSON
parsing of those fields into Haskell'sDouble
s breaks and returns nothing. You also can't override an already declared instance for a specific type, which means we can't write a new instanceFromJSON
instance forDouble
to be likeSodaNum
's instance. This means that right now, the interpreted responses just don't containDouble
values (it's been a while since I tested, so I can't remember if that's exactly what happens).I actually haven't seen too many datasets with the
Double
type, but this is still a pretty big issue. The only solution that I can think of right now would be to change theDouble
type into a newtype likeSodaNum
andMoney
. Having to deal with the newtype for those types is already pretty annoying though, and it seems like you should be able to use a basic datatype in an easier way. If there's no other way though, then I guess we'll have to do it to make responses work correctly.