feat: add JsonPointer support and conversions from and to json - #2763
feat: add JsonPointer support and conversions from and to json#2763Erchiusx wants to merge 15 commits into
Conversation
next move: add URI support and try to replace JsonPath with JsonPointer
22226ba to
b5270e6
Compare
peter-jerry-ye
left a comment
There was a problem hiding this comment.
The overall concept looks fine-ish, but the implementation doesn't look very idiomatic
|
|
||
| ///| | ||
| pub fn JsonPointer::apply(self : JsonPointer, value : Json) -> Json? { | ||
| match (self, value) { |
There was a problem hiding this comment.
Shouldn't this be a loop at least?
There was a problem hiding this comment.
loop needs intermediate result collection, I think the cost is generally alike;
but it is true that implementations need improvement
I will use iterator to implement this apply, and I am considering to reverse the link direction as a refactor.
Co-authored-by: peter-jerry-ye <16731997+peter-jerry-ye@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: peter-jerry-ye <16731997+peter-jerry-ye@users.noreply.github.com>
UTF-8 decoding function has been rewritten with potential performance regressionCategory Bytes Show implementation removed from builtin/show.mbt but added in bytes/view.mbt may cause inconsistent behaviorCategory JsonPointer implementation lacks comprehensive error handling and documentationCategory |
|
I see #2764 implemented another JSON pointer feature |
|
Yes, we will migrate the currently existing |
next move: add URI support and try to replace JsonPath with JsonPointer
trying to address issue #2758