On 19/11/14 07:57, Rob Vesse wrote:
Erich
Jena relies on an external library for JSON-LD support and more often than
not issues with JSON-LD are issues with the external library and not in
Jena itself. You can report issues to them at
https://github.com/jsonld-java/jsonld-java
Jena correctly round trips the data so it looks to be the
presentation/formatting of JSON inside jsonld-java to me. It is valid
and correct JSON-LD, just not the appearance you might want.
(using jsonld-java 1.5.1 which is the dependency for Jena development)
JOSN-LD (or at least jsonld-java) treats the empty prefix name specially
IIRC and puns it with the base URI. This might be related.
Their issues list is:
https://github.com/jsonld-java/jsonld-java/issues
Andy
You haven't shown a complete example so I wonder if the prefixes in the
JSON-LD are actually valid I.e. is JSON-LD simply choosing to define
several different prefixes?
Have you tried parsing the JSON-LD output back in again? If this works
does it give you the same graph as it started with or a different graph?
If this fails then clearly this is a bug you should be reporting to the
external library.
Rob
On 19/11/2014 04:10, "Erich Bremer" <[email protected]> wrote:
Using Jena 2.12.1:
I am getting good turtle serialization from my graph. See snippet here:
bmi:HematoxlyinKurtosis "1.922421"^^x:double ;
bmi:HematoxlyinKurtosisGradMag "2.041947"^^x:double ;
bmi:HematoxlyinSkewness "-0.343522"^^x:double ;
bmi:HematoxlyinSkewnessGradMag "0.078386"^^x:double ;
however, this same snippet becomes this when serialing out to JSON-LD:
"bmi:HematoxlyinKurtosis" : 1.922421,
"HematoxlyinKurtosis:GradMag" : 2.041947,
"bmi:HematoxlyinSkewness" : -0.343522,
"HematoxlyinSkewness:GradMag" : 0.078386,
It seems to mess up on any predicate that has a matching leading
substring.
- Erich