zazuko/xrm

JSON support for RML & carml

Closed this issue · 1 comments

ktk commented

Right now XRM supports CSV & XML with the generated RML output. JSON is missing.

IMO the only change required for that would be to support JSON as type in XRM and in this case output rml:referenceFormulation ql:JSONPath; in the generated RML or carml dialect.

Instead of XPath like in JSON we would use JSONpath but they are probably handled completely transparent from an XRM point of you. So my guess is there is no change needed for that?

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[*]"
	];