Please fix working with floating point numbers... maybe use long instead of float? modify printf formating string? Really best thing that you can do is to internally store numbers as strings unless you really need to compute with them. (AFAIK there's no support for adding ar multiplying numbers, etc... jshon is just expected to take nuber on one side and print exact same number on the other end... so just check if it's number and if it is, then just store it as string).
Here's sample problem:
jshon -e e <<<'{"e":200.123456789}'
200.123457
I've also managed to get something like 22.37 translated into 22.370001 or 22.369999, but can't find the exact number which caused the problem right now...
THX for jshon. I've been planning to create something simillar till i find jshon...
Please fix working with floating point numbers...
maybe use long instead of float? modify printf formating string?Really best thing that you can do is to internally store numbers as strings unless you really need to compute with them. (AFAIK there's no support for adding ar multiplying numbers, etc... jshon is just expected to take nuber on one side and print exact same number on the other end... so just check if it's number and if it is, then just store it as string).Here's sample problem:
I've also managed to get something like 22.37 translated into 22.370001 or 22.369999, but can't find the exact number which caused the problem right now...
THX for jshon. I've been planning to create something simillar till i find jshon...