0
gitpush
5y

Excuse my question I might be the one to blame, but on Typescript 3.7 JSON.stringify parses numbers as strings, while on 3.4 it was working without issues.

I'm no pro in web dev but I did use JSON.stringify lots of times and that's something strange here, not sure what the cause is, but when I parse number props again using parseInt(value.toString()) it works .-.

Comments
  • 0
    don't forget the radix parameter
  • 1
    That's probably not related to TypeScript. TS is just a syntax extension to JS and the actual code that comes out after compilation is plain JS. TS doesn't provide an implementation of JSON.stringify, the browser or server does.
Add Comment