Closed tygriffin closed 6 years ago
https://github.com/vapor/postgresql appears to have the same issue.
Fixed in #76 and version 2.1.2.
Hi @vzsg, my pleasure in catching this. I don't know if you are also involved in the vapor 3 code for postgresql, however the bug is also present there. Totally different code, but the same logic applies. I've opened a pull request over there too. If you aren't a reviewer over there, hopefully @tanner0101 or somebody similar can approve that one ASAP.
Well, I can always get myself involved. I made a new point release there with your fix too, thanks.
(Funny thing, my very first contribution to Vapor was fixing the same number handling issue – in v1's JSON parsing.)
When deserializing from the Postgres
numeric
datatype, values of the format 0.0x are coming out as 0.x0. So for example 0.08 is deserialized to 0.80.