Thanks for the reply, Mike.
I hadn't yet seen that second example. The use of link objects to relate an item to a type is interesting. Mostly in that the href's value would seem to be used as a URN by the client, while humans could enjoy using it as a resolvable URL to go read the type and its definition. I suppose this method has that advantage over a 'type' data object in the item's data array.
Anyway... I'm tossing around the idea of defining data objects with names 'itemType', 'itemId', and 'childItemId'. My implementation would assign values to itemId unique within the context of the current Cj document. The values would be subject to change and re-use across Cj documents. An item's data array could have zero or more data objects with name 'childItemId' whose value would be one of the assigned itemIds. No changes to the Cj doc, so this is just domain-specific semantics and documentation and desired client behavior on how to treat these items.
I was vaguely tempted to promote these data names to item attributes (becoming an extension) because you might argue they're item metadata. Alternatively these data names could be prepended with 'cj' or '_' to highlight their, ahem, "meta-ness." But, meh.
Hrm... but back to href's as URNs... I may simply be porting your ordersAndLines-cj gist from link object to data objects. I've been so tied to the idea that all the hrefs must be resolvable.
--Trevor