Skip to content

Read JSONPath references in bracket notation ($['Country Code']) - #285

Open
maximelefrancois86 wants to merge 1 commit into
RMLio:developmentfrom
maximelefrancois86:json-bracket-references
Open

maximelefrancois86 wants to merge 1 commit into
RMLio:developmentfrom
maximelefrancois86:json-bracket-references

Conversation

@maximelefrancois86

Copy link
Copy Markdown

RML-Core writes a field name with a space in the bracket notation of JSONPath: {$['Country Code']} in RMLTC0010a-c (kg-construct/rml-core). The JSON record of dataio quotes any reference that contains a space, which gives the invalid path $.countries[0]['$['Country Code']'] ("Property must be separated by comma").

Change: for a JSON record, ReferenceExtractor reads $['name'] (and the older $.['name']) as the name of the field. The record then resolves it, quoting it when it holds a space. A fix in dataio (JSONRecord.get) would be another way to do it.

Tests: RMLTC0010a-c of MapperNewRMLCoreJSONTest were @Disabled ("Needs latest JSONPath IETF support"). They are enabled again, with the mappings of the current CG suite; their copies had $.['Country Code']. mvn test on the mapper tests: 305 tests, 0 failures.

RML-Core writes a field name with a space in the bracket notation of
JSONPath, {$['Country Code']} (RMLTC0010a-c, kg-construct/rml-core). The JSON
record quotes a reference that contains a space, which gave the invalid path
$.countries[0]['$['Country Code']'] ("Property must be separated by comma").
The ReferenceExtractor of a JSON record now reads $['name'] (and the older
$.['name']) as the name of the field.

Tests: RMLTC0010a-c of MapperNewRMLCoreJSONTest are enabled again, with the
mappings of the current CG suite.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant