Yeah that’s what I mean by strictly. Does your implementation take shortcuts or does it hold itself to a higher standard and not do that?
Which C standard? ANSI C? C99?
C99 and all subsequent versions.
Re:A New Go API for JSON
by queenkjuul on Wednesday November 04, 2026 @10:43PM
(#50374880)
I don't get your argument here. You say Haskell conforms strictly to the spec and that's a good thing, okay. But then if the C spec allows for truncated names, a compiler could strictly follow the spec and truncate names. So strictly following the spec is not in fact the whole story
Yeah very sorry for the confusion. I should not have used the word strictly. I explained my definition of strictly in the above comment and it’s not really strictly in the dictionary sense. I apologize for my bad writing.
The thing is this goes both ways. For example, JSON with duplicate keys is valid JSON, and the standard specifies two ways to handle them. To support all ways JSON is used, an implementation will have to provide for both ways, and decide which one to pick as the default. The stricter default on the parsing side is at the same time the less interoperable one. Same for numeric precision: seamlessly allowing higher precision on the generating side lowers interoperability, while accepting it on the parsing side increases interoperability (but also places higher demands on the consuming application). So what do you do? There is no easy and simple answer.
A JSON parser MAY accept non-JSON forms or extensions.
An implementation may set limits on the size of texts that it accepts. An implementation may set limits on the maximum depth of nesting. An implementation may set limits on the range and precision of numbers. An implementation may set limits on the length and character contents of strings.
At then there’s more vagaries with JSON schema.