News for hackers. Stuff that matters.
Re:Fintech Engineering Handbook by dotancohen on Saturday June 27, 2026 @04:16PM (#48701339)
With I need to represent monetary amounts through JSON, I encode it as a base 10 string and wrap it in quotes so that the JavaScript engines treat it as a string. Conversion back to int happens after the string has been parsed and validated.

I do this with HTTP GET and POST form requests as well. In HTTP, everything is a string (even if that string is JSON).

There are no comments on this comment yet.