- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Wed, 5 Jul 2023 14:29:49 +0200
- To: public-webid <public-webid@w3.org>
- Message-ID: <CAKaEYhKj1YaSTkdodsovZN_XUQhVPix9hxUiTKzT5YbkfE6G6w@mail.gmail.com>
I didnt want to derail the serialization thread by talking about low power devices and webid I think it's a valid use case Firstly let me point out that linked data is all about fetching data from the web via hyperlinks The @context is of course a special term in JSON-LD that was designed for convenience but has become widely used and misused as a means to provide documentation Most specifications do not point out that the context can be inlined. This is of course superior in many ways because it removes one moving part. So in order to facilitate use cases that are self contained, we could try and reach consensus on some text that would explain that the context can be inlined and how to do that. **Section X: Inlining a Context** Note that the context within this specification can be inlined. This feature offers several advantages, notably the reduction of moving parts, leading to an enhanced, self-contained use case. To inline a context, the context object typically referenced via URL can instead be directly incorporated into the JSON-LD document. **Example:** Here is an example of how a context might look when referenced externally: ```json { "@context": "http://example.org/mycontext", "@id": "http://example.org/id1", "property1": "This is a value" } ``` And here is an example of the same context inlined: ```json { "@context": { "@vocab": "http://example.org/", "property1": "http://example.org/property1" }, "@id": "id1", "property1": "This is a value" } ``` In both cases, the document conveys the same information, but the latter version is self-contained and does not require dereferencing an external URL to understand the context.
Received on Wednesday, 5 July 2023 12:30:07 UTC