FHIR Chat · json extensions for lists · implementers

Stream: implementers

Topic: json extensions for lists


view this post on Zulip Eric Haas (Nov 06 2020 at 18:03):

Referring to this section on JSON representation of primitive elements

Note: when one of the repeating elements has no value, it is represented in the first array using a null. When an element has a value but no extension/id, the second array will have a null at the position of that element.

What if the last value(s) have no (id or extension) values, can they be omitted instead of adding nulls?

so for the example:

is this ...

 "code": [ "nz", "au" ],
 "_code": [
   {
     "extension" : [ {
        "url" : "http://hl7.org/fhir/StructureDefinition/display",
        "valueString" : "New Zealand a.k.a Kiwiland"
     }]
   },
    null
  ]

equivalent to this...

 "code": [ "nz", "au" ],
 "_code": [
   {
     "extension" : [ {
        "url" : "http://hl7.org/fhir/StructureDefinition/display",
        "valueString" : "New Zealand a.k.a Kiwiland"
     }]
   }
  ]

view this post on Zulip Eric Haas (Nov 06 2020 at 18:10):

they certainly don't seem to be equivalent json structures so I am guessing the answer is no

view this post on Zulip Grahame Grieve (Nov 06 2020 at 18:21):

the answer is yes


Last updated: Apr 12 2022 at 19:14 UTC