FHIR Chat · JSON Parameter Order · implementers

Stream: implementers

Topic: JSON Parameter Order


view this post on Zulip Richard Kavanagh (Sep 07 2016 at 09:40):

within the JSON pages of FHIR it states "Properties can appear in any order". This has been pointed out to us by one of our development partners who is intended to utilise this feature. Do the HAPI and .NET client API libraries handle this?

view this post on Zulip Mirjam Baltus (Sep 07 2016 at 10:14):

I've tested this by sending a JSON patient with the properties 'out of order' to the HAPI server, and by parsing the same JSON with the FhirParser of the .Net API. Both tests went fine, so, yes.

view this post on Zulip Richard Kavanagh (Sep 07 2016 at 11:49):

Great thank you @Mirjam Baltus

view this post on Zulip Grahame Grieve (Sep 07 2016 at 12:28):

yes this routinely tested at connectathons; the FHIR examples are always strictly in order, for the benefit of readers. But all the other implementations assign order by their own rules e.g. my server does properties alphabetically

view this post on Zulip Jens Villadsen (Sep 07 2016 at 18:16):

An object is an unordered collection of zero or more name/value
pairs, where a name is a string and a value is a string, number,
boolean, null, object, or array.

An array is an ordered sequence of zero or more values.

view this post on Zulip Jens Villadsen (Sep 07 2016 at 18:17):

Taken from http://www.rfc-editor.org/rfc/rfc7159.txt

view this post on Zulip Jens Villadsen (Sep 07 2016 at 18:17):

So JSon is unordered pr. definition


Last updated: Apr 12 2022 at 19:14 UTC