-
Notifications
You must be signed in to change notification settings - Fork 142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests need to be added
hi @NausJessy - not sure if you noticed the code review request. tests need to be added to this PR. |
@hkellaway Sorry, I forgot the tests. I will add them as soon as possible and get back to you. |
if you have time, it would be good to also have the complement - |
I updated the Furthermore, I changed all |
Hey guys, thanks for the work on this PR. This is tripping me up on an issue as well. Any idea when you think you'll be pulling this through? Thanks... :) |
sorry this one got away from me @NausJessy - just rebased and merged manually into |
First of all, what a great library! I really appreciate the work you've done and I'm using it in some of my projects.
I would like to suggest that decoding an
Integer
value to aDouble
does not returnnil
. For example, if I have the following model:and if I try to decode this json and produce a
Example
model:Gloss will return a
nil
object, as it was unable to decode anInteger
value to aDouble
. I think that this is due to the fact that 0 isn't recognised as aDecimal
value.A solution to this problem is adding a specific decoder for
Double
s.This allows for the key
value
to be decoded even when the underlying value is anInteger
. This can be useful for APIs that send back 0 instead of 0.0.