jsonpath-rust icon indicating copy to clipboard operation
jsonpath-rust copied to clipboard

Revise a need of JsonPathFinder and groom the API in general.

Open besok opened this issue 2 years ago • 4 comments

JsonPathFinder seems to be redundant. Probably, better to revise the API a remove it

besok avatar Dec 07 '23 02:12 besok

@besok 3 potential API changes would also be:

  • get rid of JsonPathInst, just export the JsonPath (in case it changes in the future, we use semver anyways)
  • change jsonpath_rust::JsonPathQuery interface to use a JsonPath rather than a &str, but at the same time implement the From<&str> trait for JsonPath, so that json.path("$..book[?(@.author size 10)].title".into()) works
  • we have JsonPathValue and JsonPtr, maybe we only need one and have Option<JsonPtr> for the None case

xMAC94x avatar Dec 11 '23 10:12 xMAC94x

I can have a look into these points after #58 got merged. Not a huge fan of gigantic refactoring PRs, rather do it in smaller steps. What do you think ?

xMAC94x avatar Dec 11 '23 11:12 xMAC94x

@besok any comment at this ? maybe any way to make communication easier than via github ? Like discord ?

xMAC94x avatar Dec 12 '23 10:12 xMAC94x

Hey! Sorry, I am on vacation and very slowly respond. Yeah, sure. You can take it and split it into a smaller prs. I will finish the review of the current pr this week.

besok avatar Dec 12 '23 13:12 besok