[Cppcms-users] JSON integer conversion(s)
Brought to you by:
artyom-beilis
From: Geert V. de V. <gee...@ba...> - 2010-06-30 08:26:06
|
Hi, I have noticed that the conversion of C++ integer numbers to json goes trough converting it to a double. This can get undesired behavior for large numbers when it automatic adds exponents when outputting it as json. eg. int uid = 1277880000; results into this: { "uid":1.27788e+09 } I want to keep the integer representation. If I want a double representation I will convert it myself explicitly. If possible by adding the function "void value::number(long int x);" this issue can be solved. It would also be useful to add conversion functions for unsigned integers. Greetings DISCLAIMER: Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you. |