On 16/02/2019 01:38, Bert Verhees wrote:

A few last words on this.

It is easy for JSON based archetype repository to cooperate with an ADL based repository. Serializing of an AOM structure to ADL is very easy to do, this counts for the DADL and CADL part. The other way around, to convert the ADL definition part to JSON is harder, that involves the parser-code and grammars which are hard to maintain.

Actually, the AOM -> JSON serialiser is generic code - in my Eiffel code base, it is a generic converter from in-memory objects (AOM instances) to something like a DOM tree (another in-memory structure consisting of just a few types of node and leaf objects) which is then trivially serialised to JSON, ODIN and YAML.

More modern libraries as found in Java and all other mainstream languages these days do the same, and additionally streaming parser tools that can potentially make the conversion quicker (in bulk).

Have a look at the Archie project <https://github.com/openEHR/archie>, you'll find very vanilla Java facilities used to do most of this work.

- thomas

_______________________________________________
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

Reply via email to