Subject: [Asdf] Contribute to more than the default namespace (PR #28)

From: Ari Keränen <[email-masked]>
Date: Wed, 21 Apr 2021 16:34:58 +0000

On the discussion of PR 28 (https://github.com/ietf-wg-asdf/SDF/issues/28) in the interim today I promised write more details about the requirements to the list.

For example, I may want to describe using SDF a sensor device that has an IPSO temperature sensor and an OCF blood pressure sensor. Both sensors would be ecosystem specific models so their definitions come for each ecosystems' namespaces, not from a common namespace. I would like to group both sdfObjects in a single sdfThing so simply providing two different definitions would not work.

An earlier draft version of SDF allowed namespace prefixes for definitions. For example:
"sdfObject" : {
"ipso:Temperature" : { ... },
"ocf:blood.pressure" : {...}
}

However, referring to those with JSON pointer does not work well if you need to expand the CURIE into a full URI (for example, "#/sdfObject/ipso:Temperature" -> "#/sdfObject/https://omaspecworks.org/ipso/#Temperature").

JSON pointer has escape mechanism for '/' (~1) and allows percent-encoding for characters not allowed in fragment rule that could help here, but it's admittedly a bit ugly. Can we do better / could this work?

Cheers,
Ari