On Sat, Jan 6, 2018 at 8:22 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote: > Hi > > I am checking the JSONPath related code > > Questions, notes: > > 1. jsonpath operators are not consistent with any other .. json, xml .. I am > missing ?, @> operátors
There are should be @? operator > 3. operator @~ looks like too aggressive shortcut - should be better > commented > > What is not clean, if jsonpath should to create some new operators for json, > jsonb types? It is special filter, defined by type, so from my perspective > the special operators are not necessary.
It's impossible to distinguish jsonpath from text, so introducing new operators are easier than everytime explicitly specify jsonpath datatype.
There are two possible solutions - special operator or explicit casting. In this case I am not sure if special operator for this case is good solution. Probably nobody will use it - because there SQL/JSON functions, but I don't think so this inconsistency is correct.
I have not strong opinion about it - it will be hidden feature for almost all users.