Re: Limitations on JSON which conforms to JSON-LD spec?

On 12/03/2014 12:45 AM, Gregg Kellogg wrote:
>> On Dec 2, 2014, at 9:44 AM, James M Snell <jasnell@gmail.com> wrote:
>>
>> On Tue, Dec 2, 2014 at 9:17 AM, Gregg Kellogg <gregg@greggkellogg.net> wrote:
>> [snip]
>>>
>>> I think I mentioned on another thread that there’s an open issue for this
>>> [1]. @index only works when you have property values which would otherwise
>>> be in an array and you want to use an object to index them.
>>>
>>> The ability to index nodes which would otherwise be in an array would be a
>>> useful extension. There are two use cases I had in mind:
>>>
>>> A top-level “@container”: “@id” in a context would indicate that the keys of
>>> the object containing the @context would be treated as @id values of the
>>> nodes they reference. For example:
>>>
>>> {
>>>  “@context”: {“@container”: “@id”},
>>>  “a”:  {“b”: “c”}
>>> }
>>>
>>> would be the same as
>>>
>>> {
>>>  “@id”: “a”,
>>>  “b”: “c”
>>> }
>>>
>>
>> This is problematic in that the labels would typically not expand into
>> URI's. The index tends to be more of a label (rdfs:label?
>> skos:prefLabel?)
>>
>> {
>>   "rdfs:label": "a",
>>   "b": “c”
> 
> Yes, of course, I was simply sketching out how this might work. Certainly all terms would need to property expand. If there’s interest, we can try to develop these ideas further, They really need discussion with the wider community (Dave? Markus?), as there may be other ideas, and the algorithms will need to be thought out.
> 
> In my copious free time :P I may work on my own implementation of what I describe here.
I would suggest
1. Starting new threads on that list for those proposals
2. Use some real world use case in examples, "a", "b", "c" give
reasonable hint to get started but IMO make it quite hard to have
concrete discussion. We could consider using example of package.json
https://github.com/digitalbazaar/jsonld.js/issues/39

Received on Wednesday, 3 December 2014 07:41:03 UTC