possible bug in the distiller or the API spec ?

Hi all,

when converting the following to RDF:

{
  "@context": {
    "@version": 1.1
  },
  "http://example.org/prop": {
    "@value": "hello",
    "@type": "@json"
  }
}

the Ruby distiller gives this result

_:b0 <http://example.org/prop> "hello"^^<
http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .

which must be wrong because the literal does not parse correctly to JSON.
It seems to me that it should instead be

_:b0 <http://example.org/prop> "\"hello\""^^<
http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .

I had a (very) quick look at the API spec but could not find the related
part. If this is what the spec says, it should probably be fixed?
Eitherway, should I propose a new unit test to checj this case?

 best

Received on Monday, 16 September 2019 18:18:58 UTC