RMLio / rmlmapper-java

The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources
http://rml.io
MIT License
144 stars 61 forks source link

JSONL support #229

Closed namedgraph closed 7 months ago

namedgraph commented 7 months ago

Hi,

Can we please see some examples of JSONL support? Documentation for release 4.15.0 suggests that it's supported, but I cannot access the issue description.

Does JSON require a change to the iterator? Using rml:iterator "$" gives an error:

[main] WARN  be.ugent.rml.records.JSONRecord     .get(82) - Expected to find an object with property ['uri'] in path $ but found 'net.minidev.json.JSONArray'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'. for path $['uri'] 

rml:iterator "$[*]" seems to work, as if JSONL is treated as an array of JSON objects, but I want to make sure that my understanding is correct.

How is JSONL support triggered? Does RMLMapper check the input file extension for .jsonl? Because the behaviour is different with .ndjson.

namedgraph commented 7 months ago

Nevermind, I was using an old version of the rmlio/rmlmapper-java Docker image...