Closed usatenko closed 1 year ago
Ignore this, I just found a solution. You can actually bind several jsonPaths.
SurfingConfiguration config = surfer.configBuilder()
.bind(JsonPathCompiler.compile(path1), JsonNode.class, jsonNodeTypedJsonPathListener)
.bind(JsonPathCompiler.compile(path2), JsonNode.class, jsonNodeTypedJsonPathListener)
.build();
So, my JSON is:
I use a non-blocking Jackson processor and would need to query all 3 keys at a time. But the problem it does not work for me.
$['key1','key2','key3']
does not give me key3 value (it actually gives but the amount of data under key3 is huge, so the nonblocking processor will assemble it for long-long time).$['key1','key2','key3'][*]
does not give me key1 and key2 values. I would want something like$[key1, key2, key3[*]]
or$[@.key1, @.key2, @.key3[*]]
This approach will allow me to get key1, key2 and skip assembling key3 array but go by it's elements one by one.Is it somehow possible?