sile / jsone

Erlang JSON library
MIT License
291 stars 72 forks source link

Doesn't encode properly float values. #18

Closed silviucpp closed 7 years ago

silviucpp commented 7 years ago

Hello,

I have an issue with jsone library and float numbers after migrating from jsonx:

jsone:encode([{<<"ss">>, 1.485}]).

will result in :

<<"{\"ss\":1.48500000000000009770e+00}">>

instead:

<<"{\"ss\":1.485}">>

Silviu

silviucpp commented 7 years ago

Sorry I just realised there is a way in api to bypass this.

sile commented 7 years ago

No problem :thumbsup: