Closed BrynCooke closed 1 year ago
Hi. Thanks for the PR. That is great, that you use the library.
Sure, the change seems to be useful. let's bring it in
Awesome. I've pushed some minor polish. Let me know if there's anything else you'd like to see. Of course if you have changes in mind that you'd like to make yourself then I'm also happy for you take it over the line.
Great. Thanks. That is a really helpful change.
Hi!
I came across this library a while back when I was looking at different jsonpath libraries and it looks nice. The only issue seemed to be that the
JsonPathFinder
API seemed to require cloning to happen, which was a showstopper for my use case. Recently I had cause to look again as the other major jsonpath library for Rust looks abandoned and has bugs.It looks like the underlying query implementation for
jsonpath-rust
supports query without having to clone the input data, however the use ofJsonPathFinder
forces this to happen.This PR is a POC API for querying without cloning that introduces a new enum
JsonPtr
for holding values. The reason this has to exist is thatderef
onJsonPathValue
is not possible without a panic forNoValue
.It'd be great if this approach could be considered for this project.