- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Sat, 31 Jan 2015 00:24:46 +0100
- To: <public-rdf-comments@w3.org>
Oh.. one more thing... as they use to say :-) You might be interested in JSON-LD Macros which allows you to do such transformations in a declarative way.. that might make it easier for developers: https://github.com/antoniogarrote/json-ld-macros On 31 Jan 2015 at 00:19, Markus Lanthaler wrote: > Hi Tom, > > As Stian says, > > On Friday, January 30, 2015 11:10 PM, Stian Soiland-Reyes wrote: >> Within a document you can have multiple @context at different levels >> and have different mappings for "id". > > ... but you can't scope term definitions to JSON property paths. This has been discusses (and > keeps coming up). The reasoning to not support this in the first place was that it would make > it much more difficult to understand how a document is interpreted. > > >> Now, "id" to a uuid sounds like it probably should be a URI and not a >> string. > > That also came to my mind, but it might be tricky to map it to the right "scheme" - at least if > you want to use urn:uuid:xxxxx because relative URNs don't exist. > > > On Friday, January 30, 2015 5:37 PM, Tom De Nies wrote: >> Right now all I can see as a solution is to force the developers to add >> the following to every object in their JSON: >> "@context" : { "id" : "@id" }, >> Which would be quite a nuisance compared to just specifying 1 external >> context... >> Am I missing something? > > No, not really. You either have to inject a context or, in this case probably easier, the @id > property where it is needed (and leaving the id -> @id mapping out in the context out). > > > Cheers, > Markus > >
Received on Friday, 30 January 2015 23:25:15 UTC