Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Robust APIs Are Weird.
If you want to use json, validate, and accept both 10 and "10" you can use json schema and do:
``` { "type": ["string", "number"]} ```
Depending on the library and language you could extend the rules to accept a string that can be parsed and throw if not.
There are no comments on this comment yet.
If you want to use json, validate, and accept both 10 and "10" you can use json schema and do:
``` { "type": ["string", "number"]} ```
Depending on the library and language you could extend the rules to accept a string that can be parsed and throw if not.