Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Million issue XML encoding #23

Open
pieterb82 opened this issue Mar 12, 2019 · 1 comment
Open

Million issue XML encoding #23

pieterb82 opened this issue Mar 12, 2019 · 1 comment

Comments

@pieterb82
Copy link

There's an issue in the library/Go with encoding floats. The default in Go is to marshal floats with more then 6 digits, so bigger then 1 million or 1000000, is encoded to scientific notation. Here's an example: https://play.golang.org/p/wgLouDNloYq

The solution would be to send over the data in JSON by default, as the encoding of JSON in the Go Library was fixed in the past, so there the floats that are bigger than a million aren't converted to scientific notation.

@TheRegan
Copy link
Member

I've created a branch using only JSON to send data here. I've only been able to do limited testing but I believe there are some issues with this that need to be resolved. Your mileage may vary.

Please check it out and let me know if you encounter any issues and what they are:

https://github.com/XeroAPI/xerogolang/tree/jsononly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants