gbv / jskos

JSKOS data format for Knowledge Organization Systems
https://gbv.github.io/jskos/
40 stars 5 forks source link

XML serialization #122

Closed nichtich closed 2 months ago

nichtich commented 10 months ago

JSKOS is a JSON format with mapping to RDF. This allows for JSON and RDF tools but some environments better use XML. An official XML representation may help to support this use case.

Meanwhile a straightforward transformation from JSKOS to XML is possible with yq (since version 4). For instance a NDJSON file with concepts can be transformed this way:

# optionally download yq 
wget https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_linux_amd64
chmod +x /yq_linux_amd64
jq -s {concepts:{concept:.}} concepts.ndjson | ./yq_linux_amd64 -oxml

A non-normative section about JSKOS/XML should be added to the specification.

nichtich commented 2 months ago

Better not open this can of worms.