Skip to content

Ignoring JSONPath references with whitespace in keys #250

@webhart

Description

@webhart

I try to map the following data:

{
	"key 1":{
		"key 2":{
			"key 3":"value 3"
		}
	}
}

using the following mapping:

@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <https://example.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


ex:my_Map a rr:TriplesMap ;
  rml:logicalSource [
    rml:source "test_data.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$[*]"
  ] ; 
  rr:subjectMap [ rr:termType rr:BlankNode ] ;
  rr:predicateObjectMap [
    rr:predicate ex:prop;
    rr:objectMap [ 
	  rml:reference "[\"key 2\"][\"key 3\"]" ; 
	  rr:datatype xsd:string 
	]
  ] .

As soon as the keys in the rml:reference contain whitespaces, the value is not picked up anymore. Any help on how to circumvent this is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions