On 16-02-19 13:20, Thomas Beale wrote:


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.

Thank you for pointing this out. But I already knew this. My point is not that it is easy to dump an ADL archetype via a parser to a JSON representation. My point is that the JSON representation must be the result and working modus of archetype/data-handling, in the archetype-designer and in the repositories. So the ADL parser and all that complex code around it becomes superfluous. There should be no temptation to do any processing with ADL.

If there is desire to have ADL-files, it is easy to serialize to them, as you already indicated.

And yes, there is YAML too, and ODIN, but both have as disadvantage that there is less support in industry then there is for JSON. So libraries to do fancy things with JSON are many. I also do not see why JSON would be a bad choice, so there is no reason for looking further then that.

Bert


- thomas


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


--
*Bert Verhees*
Software developer, architect

Profile: https://www.bertverhees.nl/

Twitter: https://twitter.com/VerheesBert
LinkedIn: https://www.linkedin.com/in/bertverhees/
Email: bert.verh...@rosa.nl <mailto:bert.verh...@rosa.nl>
Mobile: +31 06 28050294
_______________________________________________
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

Reply via email to