Hacker News new | ask | show | jobs
by anentropic 3715 days ago
what is the point of sending integer "amount" as a string?
1 comments

So 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).