You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am in process of starting new project extending jmespath with more syntax. Currently now I work on basic jmespath and extend it to support math operation +-*/% with antlr. I got the antlr file from https://github.com/burtcorp/jmespath-java
I am now stuck on design decision and wish that you could kindly help me with some suggestion
Should I support bitwise operation with &&||^ ?
Is it acceptable to use && and || as bitwise operator?
1 || 2 will return 3 for instance
And still wonder is it really necessary, especially xor operator ^
But if I include this ^ operator, it also support boolean xor in addition to && and ||
Should I bring back root node $ from jsonpath?
Should I bring back ** operator from jsonpath?
Should I support ternary condition ? true : false operator ?
Should I support ?? and ?! operator ?
And remove support on &&|| for null check in the same manner of js
It might be used as bitwise operator above instead
One difference is it will not treat false as null. Only null and empty
I would like to add support to backtracing to parent node with @.. syntax
nth number of dots - 1 will backtrack to nth parent
$.me.obj.. is equal to $.me
$.me.obj... is equal to $
Is there any better syntax for this ?
I would like to add support to index value with # symbol
For array, # would be index number 0,1,2,...
For object, # would be string "{key}"
What should I do for deep reference ?
# for current level, ## for previous level ?
$.me.obj[0].# return 0
$.me.obj[0].## return "obj"
$.me.obj[0].### return "me"
# for current level, ..# for previous level ?
$.me.obj[0].# return 0
$.me.obj[0]..# return "obj"
$.me.obj[0]...# return "me"
# for current level, ## will be fullpath as array?
$.me.obj[0].# return 0
$.me.obj[0].## return ["me","obj",0]
What should I do for slice and query? # will be index of sliced iteration or actual index?
I am in process of starting new project extending jmespath with more syntax. Currently now I work on basic jmespath and extend it to support math operation
+
-
*
/
%
with antlr. I got the antlr file from https://github.com/burtcorp/jmespath-javaI am now stuck on design decision and wish that you could kindly help me with some suggestion
Should I support bitwise operation with
&&
||
^
?&&
and||
as bitwise operator?1 || 2
will return3
for instance^
^
operator, it also support booleanxor
in addition to&&
and||
Should I bring back root node
$
from jsonpath?Should I bring back
**
operator from jsonpath?Should I support ternary
condition ? true : false
operator ?Should I support
??
and?!
operator ?&&
||
for null check in the same manner of jsfalse
asnull
. Onlynull
and emptyI would like to add support to backtracing to parent node with
@..
syntaxnth number of dots - 1
will backtrack to nth parent$.me.obj..
is equal to$.me
$.me.obj...
is equal to$
I would like to add support to index value with
#
symbol#
would be index number0,1,2,...
#
would be string"{key}"
#
for current level,##
for previous level ?$.me.obj[0].#
return0
$.me.obj[0].##
return"obj"
$.me.obj[0].###
return"me"
#
for current level,..#
for previous level ?$.me.obj[0].#
return0
$.me.obj[0]..#
return"obj"
$.me.obj[0]...#
return"me"
#
for current level,##
will be fullpath as array?$.me.obj[0].#
return0
$.me.obj[0].##
return["me","obj",0]
#
will be index of sliced iteration or actual index?I would like to support object projection key by expression Should multiselect hash accept expressions as keys #64
Any other idea overall? Any other things you don't satisfied with jmespath?
The text was updated successfully, but these errors were encountered: