2 ms·
> advice to "always" treat numbers as strings FFS, have your parser fail on inputs it can not handle. Anyway, the book defining XML doesn't tell you how your
by marcosdumay 1y ago
> advice to "always" treat numbers as strings
FFS, have your parser fail on inputs it can not handle.
Anyway, the book defining XML doesn't tell you how your parser will handle values you can't represent on your platform either. And it also won't tell you how our parser will read timestamps. Both are completely out of scope there.
The only common issue in JSON that entire book covers is comments.
The SOAP specification does tell you how to write timestamps. It's not a single book, and doesn't cover things like platform limitations, or arrays. If you want to compare, OpenAPI's spec fills a booklet:
https://swagger.io/docs/specification/v3_0/about/ https://swagger.io/docs/specification/v3_0/about/
- vbezhenar 1y ago> FFS, have your parser fail on inputs it can not handle. I wish browser developers would understand that. JSON.parse("9007199254740993") === 9007199254740992
- deleted 1y ago[deleted]