FHIR Chat · JSON Question · implementers

Stream: implementers

Topic: JSON Question


view this post on Zulip Grahame Grieve (Apr 16 2016 at 14:02):

so in the JSON spec, we say: Objects are never empty

view this post on Zulip Grahame Grieve (Apr 16 2016 at 14:03):

but we have no equivalent statement : Arrays are never empty

view this post on Zulip 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)

view this post on Zulip Josh Mandel (Apr 16 2016 at 14:58):

I'm not sure I see the value in stipulating this.

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip James Agnew (Apr 18 2016 at 19:31):

Agree with the others.. I don't see a benefit to disallowing this

view this post on Zulip 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