Re: Checking equality of graphs serialized in JSON-LD and Turtle

Am 19.10.2014 um 11:22 schrieb ☮ elf Pavlik ☮:
>> Dont use bnodes, you are violating axiom 0 of the web (among others!),
>> anything of significance should be given a URI.
> 
> Melvin, IMO *sometimes* they do make sense, still all the time
> triggering debates:
> * http://lists.w3.org/Archives/Public/semantic-web/2014Sep/0101.html
> * http://lists.w3.org/Archives/Public/semantic-web/2014Sep/0106.html
> * http://manu.sporny.org/2013/rdf-identifiers/#comment-3369
> 
> Anyways, once we patch RDF-Ext I can compare equality of graphs with
> blank nodes and normalized to JSON-LD, this way I address current state
> of things :)

Melvin is right and also the RDF-Interfaces API is designed in that way
[1]. So it's nothing I can fix in RDF-Ext, because I'm using the
RDF-Interfaces function.

But if you parse both serializations you could use the rdf-test-utils
[2] to compare the graphs. That codes just wraps the JSON-LD graph
normalization [3].

If some library translates the blank nodes 1:1 from the parsed file and
you build your test on that fact it may break with a new version. So
don't to it that way. At the end you will have less problems.

[1]
http://www.w3.org/TR/rdf-interfaces/#widl-RDFEnvironment-createBlankNode-BlankNode
[2] https://www.npmjs.org/package/rdf-test-utils
[3] http://json-ld.org/spec/latest/rdf-graph-normalization/

Received on Sunday, 19 October 2014 09:59:52 UTC