- changed status to closed
pi/netsender/netsender.go: JSONDecoder.Int method asserts float64 not int
Issue #33
closed
The JSONDecoder.Int method that takes a key for the JSON to convert the corresponding value, does not assert type to int but rather float64. This is misleading and also seems to results in error on occasion. We should change this behaviour to the correct behaviour.
Comments (1)
-
- Log in to comment
While the function initially extracts as a float64, it is converted to an int before returning the value. This won't result in any more errors than if extracted as an int initially. The error that seemed to come from this behaviour turned out to be something else, ie. no value existed for the given key.