Re: JSON serialization of SKOS data

Hi,

On 26 April 2012 19:03, Gregg Kellogg <gregg@greggkellogg.net> wrote:
> On Apr 26, 2012, at 9:18 AM, Stéphane Corlosquet wrote:
>> The JSON-LD "Compact Mode" seems near from what I need with just what also allows to regenerate the original RDF.
>> I have now to analyze how to integrate this in the middle of my SKOS/POJO, SKOS/XML marshaller, RDF production JSP, Abdera AtomPub Server (alouette...) so not to build a "Gaz Plant".
>> More seriously, I need a Java serializer (JSON.parse() unserializes...) for my POJO beans modelled on the SKOS terminology (for instance Concept class with getPrefLabel method returning a List of Term with Language and Label). I suppose JSON-LD is made for RDF and that I have to find instead a kind of JAXB for JSON and adapt its output to make it compatible with JSON-LD?
>
> Just to clarify, JSON-LD is not "made for RDF", but does include some facilities to go back and forth between RDF and JSON-LD.
>
> There are four implementations of JSON-LD which pretty much support what you want to do (JavaScript, PHP, Python and Ruby). Probably the best way to get started is using the "fromRDF" api call to get from an RDF graph into JSON-LD expanded form, and then compact or frame to make the structure of the JSON-LD match your needs.
>
> There's also a java implementation (https://github.com/tristan/jsonld-java), which may also implement many of the calls you need, but I don't have any direct experience with it.
>

That's exactly what we were exploring in the Serennoa FP7 project:
JSON-LD views of the beans using REST. The indirect ways is thought
jtrioo using jsonld-java, but I'm sure we can improve the integration
with jersey.

The code at the morfeo's forge:
https://forge.morfeo-project.org/scm/viewvc.php/trunk/carfo/api/src/main/java/eu/serenoa/carfo/web/rest/BrowsersResource.java?revision=153&root=serenoa&view=markup

Cheers,


-- 
Sergio Fernández
CTIC - Technological Center
Parque Científico y Tecnológico de Gijón
C/ Ada Byron, 39 Edificio Centros Tecnológicos
33203 Gijón - Asturias - Spain
Tel.: +34 984 29 12 12
Fax: +34 984 39 06 12
E-mail: sergio.fernandez@fundacionctic.org
http://www.fundacionctic.org
Privacy Policy: http://www.fundacionctic.org/privacidad

Received on Thursday, 26 April 2012 21:17:04 UTC