mholt / json-to-go

Translates JSON into a Go type in your browser instantly (original)
https://mholt.github.io/json-to-go/
MIT License
4.51k stars 475 forks source link

Partial Float Fix #119

Closed apxamccallum closed 2 years ago

apxamccallum commented 2 years ago

Regex to add 0.1 to floats did not account for negative numbers. Added quantifier to check for negative numbers. Added tests for floats.

I have not fixed the issue with arrays of floats. I think a regex to fix those will have too many false positives.

apxamccallum commented 2 years ago

reviewing alternate solutions