-
Notifications
You must be signed in to change notification settings - Fork 2.7k
(Double)Real value write as Integer #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this is acceptable behavior. JSON doesn't distinguish various sorts of |
OK, now I understand.... maybe? |
Hi, If is possible to write same output as is read, it could be write. So when you have some clever mechanism to identify number as int, resp. real, you could write real. This do python for example. I know, that i can retype values to real from int, but for generic reading, type changing is problem. |
@ondratu, I don't think this happens for the StreamWriter, does it? |
Yes, here is output from my sample code (build on debian buster with libjsoncpp version 1.7.4):
|
Hmmm. I could be wrong, but I think the most recent commit to |
Yes, master works. Thanks a lot ;-) |
writer's sprintf with %g doesn't print dot when 0 below.
%lf is OK. but not optimized.
Maybe need to add some codes.
Or am I misunderstand something?
The text was updated successfully, but these errors were encountered: