jsonata.net.native
jsonata.net.native copied to clipboard
Parent (%) operator seems not to work
Simple example:
JSON:
{
"Account": {
"AccountName": "Firefly",
"Order": {
"test": "test"
}
}
}
Query:
Account.Order.%.AccountName
Works in Exerciser and Javascript library.
In .Net: The symbol % cannot be used as a unary operator'
Yes, for now it's not implemented, as mentioned at https://github.com/mikhail-barg/jsonata.net.native#operators
I have no ETA on implementing this yet (
Sorry, we read that then too. Is there a way to help out here, or is this a somewhat very complicated feature?
Well, this feature was one of the reasons to create custom json parser/dom as it became clear that Json.Net is not capable of supporting this properly.
But since then I haven't got enough time and will to look through it once again. And yes, the feature it a bit complicated.
But since you are interested, I'll try to find some time for another attempt.
Okay, I've made an implementation for the operator behavior. The implementation is quite different from the on in the original jsonata-js (which I hardly understand), but it passes all the tests, except 4 tests with another unsupported operators, and except another one which is kinda really weird.
I have raised an issue regarding this last test. And I'd like to wait for a feedback from original Jsonata team regarding this one, before releasing a new package version.
Hi there, thank you so much - that was really quick!
Published changes in v2.3.0 release. Still no answer regarding that strange issue from jsonata team.