Skip to content

Iterating over single value fails #9

Description

@termontwouter

Related to the difference in iterating over arrays (cf. #6), I also noticed that MappingWeaver fails when using the index wildcard [*] in a reference to a JSON value that is not an array. Again, I don't know what the RML spec would prescribe in such cases, but RMLViewer/RMLMapper nevertheless return the single JSON value instead.

Minimal example:

:view a rml:LogicalView ;
  rml:viewOn [
    # JSONPath root iterator over { "key": "value" }
  ] ;
  rml:field [ rml:fieldName "key" ; rml:reference "key[*]" ]
  .

:mapping a rml:TriplesMap ;
  rml:logicalSource :view ;
  rml:subjectMap [ rml:termType rml:BlankNode ] ;
  rml:predicateObjectMap [
    rml:predicate <urn:example:hasValue> ;
    rml:objectMap [ rml:reference "key" ]
  ] .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions