Archie offers a json serializer and deserializer. For Odin they are present as 
well, but has not been tested with archetypes, may need a small bit of work. 
Yaml should be a matter of adding a dependency and configuring it.
We're still working on XML - the bindings are there and it works, but the AOM 
schemas have not been finished yet so there will be changes, see the 
specifications-ITS-XML repository on GitHub for details.

One could argue ADL is easier to read and write by humans than json, yaml, Odin 
or XML. The other formats have a lot more tools available. Good thing we have 


Pieter Bos

Op 15 feb. 2019 20:41 schreef Thomas Beale <>:

JSON, YAML and ODIN are all just object-dump serial formats that result from 
traversing an in-memory object graph, so it is a generic operation to generate 
them from tools (XML is more problematic due to being irregular in many ways 
and being schema-dependent).

In the case of archetypes, the dump is just of objects that are instances of 
 i.e., ARCHETYPE, C_ATTRIBUTE, various kinds of C_OBJECT and so on.

The ADL Workbench has an export mode (for I think around 5 yeras) that 
generates the first 3 for any archetype, and also a whole archetype library. 
The folks doing CIMI use at least the JSON mode. It also generates XML, via 
custom serialiser.

One of the jobs I never completed is a deserialiser for the 3 regular formats, 
but it is nearly trivial. I am not sure if Archie or Marand's ADL-designer 
tools do the same but I think it should be trivial for them to implement as 

I will look into this again...

- thomas

On 15/02/2019 18:51, Bert Verhees wrote:
I always admired OpenEhr for its ability to notate archetype-definitions and 
now also BMM definitions in any type.

I saw experiments in XML, but the official endorsed notation language is ADL.

I wonder, would it also be possible to write archetypes and reference-models in 

If so, it would save us tons of code, no grammars needed, no parsers needed. 
Many programming languages support JSON out of the box, with only some 
annotations needed. NoSQL Databases often support JSON, and have their own 
JSON-path based hierarchical query-languages.

Venkat Subramaniam, who is a java-guru, said: "Don't walk away from complexity, 

But Einstein said: "Everything Should Be Made as Simple as Possible, But Not 

So the question is: Are there any technical objections to express archetypes 
and reference-models in JSON?

Best regards

Bert Verhees

openEHR-technical mailing list<>

Thomas Beale
Principal, Ars Semantica<>
Consultant, ABD Project, Intermountain 
Management Board, Specifications Program Lead, openEHR 
Chartered IT Professional Fellow, BCS, British Computer 
Health IT blog<> | Culture 
blog<> | The Objective 
openEHR-technical mailing list

Reply via email to