Re: [JSON] Examples for RDF JSON serializations side-by-side comparison

Andy,

May I ask you to add/edit to my samples on the Wiki? I guess this
scales better than snippets in attachments and inlined in emails.

Also, as Sandro wrote, cruel ;-) Do you want all these features
covered by our RDF JSON serialization(s), or were you just coming up
with nasty RDF snippets? Either way is fine, just wanted to clarify.

Thanks,
Tom

On Wed, Mar 23, 2011 at 15:46, Sandro Hawke <sandro@w3.org> wrote:
> On Wed, 2011-03-23 at 13:55 +0000, Andy Seaborne wrote:
>>
>> On 23/03/11 13:21, Thomas Steiner wrote:
>> > Hi all,
>> >
>> > As per ACTION-20 (http://www.w3.org/2011/rdf-wg/track/actions/20) I am
>> > to create a side-by-side comparison table for the proposed RDF JSON
>> > serializations so far. I have come up with two examples, one basic,
>> > and one advanced example, and wanted to get your feedback on the
>> > samples. Are they complex enough? Do they miss an RDF feature you
>> > would like to see covered? Are they too real-world-ish or too
>> > theoretic? Please feel free to edit/add your feedback on the Wiki
>> > section:
>> >
>> > =>  http://www.w3.org/2011/rdf-wg/wiki/TF-JSON#Sample_Graphs<=
>> >
>> > I will take whatever we have agreed on by Saturday, and try to convert
>> > the two examples in a couple of JSON docs.
>> >
>> > Best,
>> > Tom
>> >
>>
>> Real world is more useful in seeing what the options might look like -
>> I've tried here to write out all the features I can think of as
>> synthetic test data for coverage.
>>
>>
>>
>> @prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
>> @prefix : <http://example/> .
>>
>> :x1 :p1 1 ;
>>      :p2 1.0 ;
>>      :p3 1.0e0 ;
>>      :p4 () ;
>>      :p5 (1 2 "three" ) ;
>>      :p6  [ :q 57 ; :q 89 ] ;
>>      :p7 _:a .
>>
>> _:a  :p1 :z ;
>>       :p2 "str" ;
>>       :p3 "str"^^xsd:string .
>>
>> []  :p :z .
>>
>> :z rdfs:label "Swansea"@en , "Abertawe"@cy ;
>>     :q1 "2011-03-23T13:40:22.489+00:00"^^xsd:dateTime ;
>>     :q2 "2011-03-23Z"^^xsd:date ;
>>     :q3 "2011-03-23"^^xsd:date ;
>>     :q4 "2011+01:00"^^xsd:gYear ;
>>     :q5 "2011"^^xsd:gYear .
>>
>> ("a" "b" "c" ) :p [ :p (1 2) , (3 4) ] .
>>
>> [ :p (1 2) , (3 4) ] :p ("a" "b" "c" ) .
>>
>> # These are not strict Turtle where everything
>> # must be "subject-predicate" form.
>> # They are SPARQL.
>>
>> ("a" "b" "c" ) .
>
> This should be flagged a little more clearly as "NOT RDF".  A mapping
> can reject this one and still be 100% RDF.
>
>> [ :p (1 2) , (3 4) ] .
>
> Oh that's really not in Turtle?   Sad, if true.
>
>>
>> Attached:
>>    D.ttl (the data above)
>>    D.nt (converted to N-triples)
>
> Brilliant!   And cruel!    I'm trying to imagine Tom sitting on the
> plane sorting this out against the various specs.    He might find he'd
> rather just write the code.
>
>   -- Sandro
>
>



-- 
Thomas Steiner, Research Scientist, Google Inc.
http://blog.tomayac.com, http://twitter.com/tomayac

Received on Wednesday, 23 March 2011 15:02:20 UTC