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.48k stars 473 forks source link

Partial Float Fix #119

Closed apxamccallum closed 1 year ago

apxamccallum commented 1 year 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 1 year ago

reviewing alternate solutions