FHIR Chat · XML / Json conversion · javascript

Stream: javascript

Topic: XML / Json conversion


view this post on Zulip David Hay (Jun 07 2019 at 19:59):

Is there a way in fhir.js to convert between xml & json?

view this post on Zulip Josh Mandel (Jun 07 2019 at 20:10):

XMwhat?

view this post on Zulip Grahame Grieve (Jun 07 2019 at 20:10):

no, it's <xml>

view this post on Zulip nicola (RIO/SS) (Jun 13 2019 at 16:33):

To do so fhir.js should be aware of FHIR metadata - because of order matter in xml :( One of our students started working on this.

view this post on Zulip Michael Lawley (Oct 20 2019 at 07:10):

There's the server-side option: POST to /$convert

view this post on Zulip Oliver Egger (Oct 20 2019 at 08:40):

there is also http://lantanagroup.github.io/FHIR.js/ however I personally did not try it out, maybe @Sean McIlvenna knows more?

view this post on Zulip Sean McIlvenna (Oct 20 2019 at 17:00):

Yes, the entire purpose of that module is xml/json serialization. It uses the core fhir spec (StructureDefinition files) to determine how to serialize.

view this post on Zulip Sean McIlvenna (Oct 20 2019 at 17:01):

I use it successfully in other applications such as Trifolia-on-FHIR

view this post on Zulip Sean McIlvenna (Oct 20 2019 at 17:02):

It is quite fast/ efficient


Last updated: Apr 12 2022 at 19:14 UTC