Open spyzhov opened 3 years ago
@spyzhov Does this include #12 the additional jsonb operators
?
@iamtheschmitzer, Yes. I'm going to implement it.
Is there any way we can help you with this? I would like to use this library and v1 would be great.
I'd like to, but right now I'm not sure if it is possible. I will try to split this issue later.
Draft for the
Version v1.0.0
milestoneCreate sub-package
ajson/jsonpath
with the main types and functions:Add changes in the main package:
Token
typesjmath
;internal
package;threadsafe
part, as it is unused.Add public interfaces:
Node
, such asStringNode
,ArrayNode
, etc.IterableNode
interface forArrayNode
andObjectNode
for
[]*Node
add aliastype Nodes []Node
Add a fake type
Date
(discussed)Add functional methods
additional jsonb operators
from https://www.postgresql.org/docs/9.5/functions-json.htmlFuntion
type to:not
=>!@.length
math
functions:in
=>value in [array]
max(array|object)
,min(array|object)
,avg(array|object)
.Buffer
interface, which could be based on (1)[]byte
and (2)io.Readable
interface;!()
outside of the filter section;-m/-multiline
. Example: JSON logs in Docker.-f/-stream
. It will do the output as soon as the value was found.-pretty
-reverse/-r
lock
function and lock nodes on modifications.Use it for root (if needed)
Option
to create a*Node
if it was not found during theJSONPath
execution. Example:With the given
json
value{}
the result output for theroot
will be{"foo":{"bar":null}}