Open ritchie46 opened 3 years ago
Just to link here since it has been raised https://github.com/freestrings/jsonpath/issues/72
@potter420, I saw that your forked. When I worked on this, I had quite a clear view how it could be improved, if you want any discussion on this, let me know.
I'm quite new to Rust, and still trying to wrap my head around it. I forked to try to figure out something on my own for learning experience mostly. This lib seem to be teaching a lot about heap and stack allocation and when they should be used.
It looks like the latest git version should do less allocations now.
The dependency used to extract json paths does a vec and multiple string allocs per query. We could do a PR and improve their API. Allocations could be amortized.
Another useful feature would be a
take
similar tostd::mem::take
.