3 ms·
What you're describing here is a schema-specific parser. Even if the parser succeeded, you would reject the input as the values are out of range. Making a custo
by karmakaze 5y ago
What you're describing here is a schema-specific parser. Even if the parser succeeded, you would reject the input as the values are out of range. Making a custom parser for this is fine, but call it what it is a parser for a subset of JSON--it would fail for a value of 0.1 or -1.
- horsawlarway 5y agoSure. The problem is that many things that a very strict spec might require have real resource requirements. There's a reason the URL length in http is undefined, it's because the machine accepting the request doesn't have infinite memory. Even the latest spec is a simple recommendation to accept a request line of at least 8k octets. You can say "We must support nesting depth of N" in json, but the reality of the situation is that parsers can and will just ignore you. Are they non-compliant? Sure. Are they useful? Sure. Will people still use them? Fuck yes they will. Because utility trumps strictness in most cases.