Open
Description
When a JSONPath in an rr:predicateObjectMap maps to a JSON element that is null in a file, a NullPointerException is thrown. However, when mapping large datasets, JSON files will sometimes have null fields. The mapping should then just not be applied, instead of failing with a NullPointerException.
Example:
Mapping:
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix ex: <http://example.org/> .
<#TestMapping>
rml:logicalSource [
rml:source "/media/Nasenbluten/freme/test.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$"
];
rr:subjectMap [
rr:template "http://example.org/{Subject}" ;
rr:class ex:Subject
];
rr:predicateObjectMap [
rr:predicate ex:pred;
rr:objectMap [
rml:reference "test.fails";
]
].
JSON:
{
"Subject" : "subject",
"test" : {
"fails" : null
}
}
}
Activity