New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: JSON path does not work for iterations over lists of objects #132
Comments
Can you provide |
Moving owner to the iterator works:
I think it is due to how Morph-KGC is creating a final jsonpath expression i.e. |
Thanks for having a look: I changed a little the mapping to fix my issue, but this remains a problem. All files can be seen below:
Mapping: https://github.com/KnowledgeCaptureAndDiscovery/somef/blob/master/src/somef/mapping/yarrrml.yml My new test json:
|
@arenas-guerrero-julian - I am hit with same bug. It works in 2.1.1 but not versions above that. |
@arenas-guerrero-julian - can we expect fix in near term? 2.4 0 is much faster and only this bug is preventing us moving to that |
@arenas-guerrero-julian unfortunately we will not be able to go XML for some reason .. thanks .. we will wait and hopefully will be done in near future . |
Hello @arenas-guerrero-julian, As @ramcaat , I wanted behavior of version 2.1.1 related to jsonpath to be kept so I cloned current version 2.4.0 and changed line 150 of morph-kgc/src/morph_kgc/data_source/data_file.py by this line: This change makes my mappings that used jsonpath work, but I am not sure why it was changed or if I missing any important decision. What could go wrong by having this line replaced as it was in 2.1.1? Regards. |
Hi @KappaGi , Thanks for taking a look over this. Could you please open a pull request with the changes to see if it passes the all unit tests?. If it passes all of them we can merge the changes :) Julián |
This is fixed and will be available in next release. |
What Happens?
if my JSON looks like this:
And I try to use the following mapping:
No results are returned. However, this works with Matey. I tried other things like
$(owner[*].name)
but it does not work either.To Reproduce
See above
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: