zazuko / xrm

A friendly language for mappings to RDF
MIT License
1 stars 0 forks source link

Support source of type JSON #122

Closed mchlrch closed 1 year ago

mchlrch commented 1 year ago

Add support for source type json.

logical-source people {
    type json
    source "People.json"
    iterator "$.[*].People"

    referenceables
        ...
}

JSON source is compatible with the following mapping outputs: rml, carml

Reference formulation in the generated (CA)RML mapping file: rml:referenceFormulation ql:JSONPath

See also: https://rml.io/docs/rml/introduction/

mchlrch commented 1 year ago

Resolved, xrm version 1.3.0 supports mapping of JSON source

Sample source definition in XRM:

logical-source characters {
    type json
    source "characters.json"
    iterator "$.characters[*]"

    referenceables
        id
        firstname
        lastname
        hair
}

Generated rml:logicalSource:

    rml:logicalSource [
        rml:source "characters.json";
        rml:referenceFormulation ql:JSONPath;
        rml:iterator "$.characters[*]"
    ];