On 16/02/2019 01:38, Bert Verhees wrote:
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.
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.
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.
openEHR-technical mailing list