Repository navigation
Read JSONPath references in bracket notation ($['Country Code']) - #285
Open
maximelefrancois86 wants to merge 1 commit into
Open
maximelefrancois86 wants to merge 1 commit into
maximelefrancois86 wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,
ReferenceExtractorreads$['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
MapperNewRMLCoreJSONTestwere@Disabled("Needs latest JSONPath IETF support"). They are enabled again, with the mappings of the current CG suite; their copies had$.['Country Code'].mvn teston the mapper tests: 305 tests, 0 failures.