fixed casting problem with float fields

An object with a float field that had a value that could be an Integer
was failing to deserialize, due to an incorrect cast from Integer to
Float.