Parse numeric fields
This pull requests allows <input type="number"> fields to be serialized as numeric values, ex:
{ "cost": 50 } instead of { "cost": "50" }.
looks reasonable to me - tests are failing tho :cry:
It looks like a phantomjs configuration issue. The tests themselves appear to pass. Same thing happened locally.
Karma or one of its dependencies had a breaking change in a non-major version, yay! Pinning your own dependencies won't save you; will update build config soon.
What should the expected behaviour be for invalid number inputs if we do this? IIRC they return '' from .value :frowning_face:
Hm, @insin good catch -- a value of "" (empty string) evaluates to NaN, which would be invalid JSON. I would suggest anything that's not a valid number be null. We could do that via parseInt(element.value, 10) || null. Does that speak to what you raised? If not, could you give an example?
Hey @insin just checking in on this. What do you think about the above?