On 5 November 2010 18:39, Reto Bachmann-Gmuer <[email protected]> wrote:
> Hi Fabian
>
> On Wed, Nov 3, 2010 at 4:24 PM, Fabian Christ
> <[email protected]>wrote:
>
>> Hi,
>>
>> as one part of the EU funded project "Interactive Knowledge Stack" IKS
>> [1] and by this part of the Apache FOO incubation proposal we currently
>> use Clerezza as one underlying framework.
>>
>> Currently, I'm implementing a JSON-LD [2] serializer as part of the FISE
>> component [3]. This serializer implements the Clerezza
>> SerializingProvider interface. So this serializer is basically a
>> Clerezza serializer.
>>
>> The JSON-LD format supports namespaces, so we need some way to manage
>> known namespaces and their prefixes within the whole system. An example
>> of a JSON-LD output looks like this:
>>
>> {
>>    "#": {
>>        "dbpedia": "http:\/\/dbpedia.org\/ontology\/",
>>        "dcterms": "http:\/\/purl.org\/dc\/terms",
>>        "fise": "http:\/\/fise.iks-project.eu\/ontology\/",
>>        "xmlns": "http:\/\/www.w3.org\/2001\/XMLSchema#"
>>    },
>>    "@": "<urn:iks-project:fise:test:text-annotation:Person>",
>>    "a": [
>>        "<http:\/\/fise.iks-project.eu\/ontology\/Enhancement>",
>>        "<http:\/\/fise.iks-project.eu\/ontology\/TextAnnotation>"
>>    ],
>>    "dcterms:\/created": "\"2010-10-27\"^^<xmlns:dateTime>",
>>    "dcterms:\/creator": "urn:iks-project:fise:test:dummyEngine",
>>    "dcterms:\/type": "dbpedia:Person",
>>    "fise:end": "\"20\"^^<xmlns:int>",
>>    "fise:selected-text": "\"Patrick Marshall\"^^<xmlns:string>",
>>    "fise:selection-context": "\"Dr. Patrick ..\"^^<xmlns:string>",
>>    "fise:start": "\"4\"^^<xmlns:int>"
>> }
>>
>> This brings us to two questions:
>>
>> 1) How does Clerezza handle the namespaces and prefixes? Is there some
>> centralized service that FOO could use? If there is no namespace
>> handling yet, what are the Clerezza plans here? Maybe we could find a
>> solution that is useful for both projects.
>>
> That's indeed something that should be done, a service that gives prefix
> suggestions for namespace prefixes.
>
>
>>
>> 2) Is the Clerezza community interested in the JSON-LD serializer? We
>> would be happy to commit the code to Clerezza instead of our own code
>> base and support Clerezza.
>>
> That's great! What is the media-type for the JSON-LD and do you now how it
> compares with the format currently served as application/rdf+json (I see
> that LD looks nice and compact, are there client-side libraries that support
> it?).

The recommended media-type is just application/json (according to the
authors of the JSON-LD spec). Currently there is only a python
implementation:

  https://github.com/bradleypallen/json_ld_processor

But the project is brand new and already very active. Ready the spec
is very worth it:

  http://json-ld.org/spec/latest/

-- 
Olivier

Reply via email to