Stream: implementers
Topic: JSON Question
Grahame Grieve (Apr 16 2016 at 14:02):
so in the JSON spec, we say: Objects are never empty
Grahame Grieve (Apr 16 2016 at 14:03):
but we have no equivalent statement : Arrays are never empty
Grahame Grieve (Apr 16 2016 at 14:03):
should we? it would be our general intent not to have syntactic redundancy, but this has never come up (I just noticed it because I am writing test cases for the validator)
Josh Mandel (Apr 16 2016 at 14:58):
I'm not sure I see the value in stipulating this.
Josh Mandel (Apr 16 2016 at 14:59):
I mean, an implementation shouldn't choke on seeing an empty array for a 0..* element, in my opinion.
Michael Lawley (Apr 18 2016 at 15:13):
agreed. it's often handy in javascript clients, for example, to init such things to empty, ready for layer population
James Agnew (Apr 18 2016 at 19:31):
Agree with the others.. I don't see a benefit to disallowing this
Lloyd McKenzie (Apr 18 2016 at 19:47):
We need to call attention to this for conversion purposes then.
Last updated: Apr 12 2022 at 19:14 UTC