Update to Jena 5.2 and Json-LD 1.1#5280
Conversation
| } | ||
|
|
||
| # Json-LD Api configuration | ||
| json-ld-api { |
There was a problem hiding this comment.
The ability to have to configure the severity of the parser was introduced a while back to avoid problems down the line with Blazegraph for example because some @id would be invalid.
Since then it was always used as strict and we never had problems so we can just get rid of this configuration and:
- Use the strict configuration for writes
- Use the lenient configuration for reads
| "result": { | ||
| "@type": "sh:ValidationResult", | ||
| "focusNode": "nxv:MyShape", | ||
| "result:Path": { |
There was a problem hiding this comment.
This was a bug from the previous Json-LD library.
Same as #5102
| for { | ||
| link <- SparqlExternalLink(bindings) | ||
| project <- | ||
| bindings.get(nxv.project.prefix).map(_.value).flatMap(Iri.absolute(_).toOption).flatMap(projectRefFromId) |
There was a problem hiding this comment.
This was renamed to follow a naming change in Jena which now follows a different RFC for IRIs.
apache/jena#2800
| "_attributes": "https://bluebrain.github.io/nexus/vocabulary/attributes", | ||
| "_keywords": "https://bluebrain.github.io/nexus/vocabulary/keywords", | ||
| "_keywords": { | ||
| "@context": { |
There was a problem hiding this comment.
Use a scoped context
| * Support for converting between Jakarta Json and Circe Based on | ||
| * https://github.com/circe/circe-jackson/blob/master/shared/src/main/scala/io/circe/jackson/package.scala | ||
| */ | ||
| package object jakartajson { |
There was a problem hiding this comment.
Nexus and Titanium use different json libraries so this is needed to do a conversion between those.
Before that Nexus was just getting back to a raw string and parse things again with the target library. This had a performance overhead which is now eliminated.
| "xsd": "http://www.w3.org/2001/XMLSchema#", | ||
| "xsd2": "http://www.w3.org/2001/XMLSchema#", | ||
| "Person": "http://schema.org/Person", | ||
| "Person2": "http://schema.org/Person", |
There was a problem hiding this comment.
I still need to check that again but it does not take the same prefix when 2 prefixes point to the same target.
It should not happen in real life though.
| val input = | ||
| json"""{"@context": ["http://localhost/c", {"a": "http://localhost/a"} ], "a": "A", "c": "C", "d": "D"}""" | ||
| ExpandedJsonLd(input).rejected shouldEqual RemoteContextCircularDependency(iri"http://localhost/c") | ||
| ExpandedJsonLd(input).rejectedWith[ConversionError].getMessage contains "Too many contexts" |
There was a problem hiding this comment.
With Json-LD 1.1 and imported contexts, the circular dependency check is replaced by a maximum number of loaded contexts
| "project": { | ||
| "@type": "@id" | ||
| }, | ||
| "valueX": { |
There was a problem hiding this comment.
For some reason, putting the type meant that the property was not compacted anymore.
The Json-LD playground has the same behaviour.
| "@context": [ | ||
| "https://neuroshapes.org", | ||
| { | ||
| "@base": "https://bbp.epfl.ch/neurosciencegraph/data/", |
There was a problem hiding this comment.
When setting a base, it attempts to compact the ids relatively to this value by default.
It was enabled in the previous code but did not work for some reason.
| "uHillCoefficient": { | ||
| "@id": "https://bbp.epfl.ch/ontologies/core/parameters/uHillCoefficient" | ||
| }, | ||
| "uberon": "http://purl.obolibrary.org/obo/UBERON_", |
There was a problem hiding this comment.
targets ending this way do not work anymore.
Consistent with the Json-Ld playground
| "_filename": "attachment.json", | ||
| "_incoming": "{{fileSelfPrefix}}attachment.json/incoming", | ||
| "_mediaType": "application/json", | ||
| "_origin" : "Client", |
There was a problem hiding this comment.
Bug from the previous library which is now fixed
| "@type": [ | ||
| "Annotation", | ||
| "MType:Annotation" | ||
| "MTypeAnnotation" |
| "@type": [ | ||
| "MType", | ||
| "Annotation:Body" | ||
| "AnnotationBody" |
| "nValue" : 5, | ||
| "unit" : "neurons/mm³", | ||
| "value" : 35200.0 | ||
| "value" : 35200 |
There was a problem hiding this comment.
Conforms to the spec if the decimal value is 0, it gets dropped.
| json""" | ||
| { | ||
| "value" : 0.21388888888888888, | ||
| "value" : 0.2138888888888889, |
There was a problem hiding this comment.
Rounding is different now.
It is consistent with the Json-LD playground.
No description provided.