hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

Terser has odd behaviour #6403

Open tadgh opened 4 weeks ago

tadgh commented 4 weeks ago

Currently, if you create a bundle with two resources, each with an identical contained resource, the JSON Parser will produce a garbled response, such as the following:

{
    "resourceType": "Observation",
    "id": "1348",
    "contained": [
        {
            "resourceType": "Practitioner",
            "id": "1"
        }
    ],
    "status": "final",
    "effectiveDateTime": "2024-10-11T15:24:00-06:00",
    "issued": "2024-10-11T15:24:00-07:00",
    "performer": [
        {
            "reference": "#1"
        }
    ],
    "valueString": "0.032",
    "specimen": {
        "reference": "#1"
    }
}