3 ms·
what is the point of sending integer "amount" as a string?
by anentropic 11y ago
what is the point of sending integer "amount" as a string?
- Matt3o12_ 11y agoSo that it can be an integer with an arbitrary length, or a float/double without precision problems. You can also let our own integer classes do the parsing (which might even be able tonhandle complex types). After all, everything in JSON is a string since it doesn't have a binary format and it shouldn't cause a huge overhead to do the parsing yourself (that might depend on the library, though).