Re: [JSON] Survey for design requirements

On 09/03/11 20:03, Manu Sporny wrote:
> On 03/09/11 04:45, Andy Seaborne wrote:
>>> There are two things that happened above:
>>>
>>> 1. Frank's system provides a default context that changes all of his
>>>      plain old JSON into RDF.
>>> 2. The person interfacing with Frank's system provides their own
>>>      set of keywords that expand to full URIs - enabling any triple
>>>      to be stored alongside Frank's regular account information.
>>>
>>> So, the transition from plain old JSON to JSON+RDF happens smoothly.
>>> Frank makes this transition because it makes his REST services far more
>>> flexible than just plain old JSON.
>>
>> I hope any mapping is the serialization. It's important that if the
>> format is a graph, or triples, then the representation is
>> self-contained. If it points to an external context then the meaning can
>> be changed by some external change.
>
> The mapping is in the serialization in some cases ("context") and/or
> assumed by the Web Service in other cases ("default context"). You can
> see an example of a "default context" in JSON-LD:
>
> http://json-ld.org/spec/ED/20110201/#an-example-of-a-default-context
>
> The "default context" can be provided to the initialization code of the
> JSON-LD processor. A "context" can be provided by the person authoring
> JSON and overrides mappings previously established by the "default
> context". So #1 above is achieved via a "default context" and #2 above
> is achieved via a "context" specified in the serialization.
>
> It is a best practice to always include all information about mappings
> in the serialized data at the top level of the serialization. That is,
> all JSON-LD serializations SHOULD include a list of mappings used in the
> JSON-LD serialization. However, Web Services MAY also specify a "default
> context" in the case where they have to support legacy clients that
> don't know anything about JSON-LD, but do know how to speak the normal
> JSON protocol used by the service.
>
> Did that make sense?

Yes, I understand.  The design allows external changes to influence the 
RDF triples after reading them.

 Andy

(I'll try to write up some other aspects of JSON-LD that worry me when 
cosidering it as a general RDF format - mostly to do with working with 
apps that aren't JSON and POSting data back into a store)

>
> -- manu
>

Received on Wednesday, 9 March 2011 21:09:10 UTC