Important: Work in progressThe FHIR standard allows a number of serialisations of resources to be used. Ideally, servers will support the two main serialisations – XML and JSON, however there may be cases where this is difficult to achieve.
- FHIR APIs MUST support JSON serialisation.
- All FHIR endpoints MUST support JSON formatted requests/responses.
- FHIR endpoints MAY also support XML formatted requests/responses.
- The serialisation mime-types supported MUST be declared in the Conformance/CapabilityStatement resource for the endpoint, and the server MUST use the usual FHIR mechanisms to allow clients to request a specific Content Type as per the FHIR spec (servers may choose to reject the use of XML if it is not supported).
- Namespaces outside those defined in the FHIR specification MUST NOT be used.
The FHIR standard specifies a specific namespace for FHIR XML elements, with a second namespace for XHTML content in narrative sections. Those specifying FHIR APIs MUST not use other namespaces in their APIs.