-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the reviver function to JSON.parse #410
Conversation
Thanks for the contribution! This will collide with #402, though. We should probably wait for that to land. |
@Razican Sure! Meanwhile, can you please take a look at the changes? |
Yep, I will check this today :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Check my comments there mostly just for readability and clippy issues.
The next thing we need to do is adding tests, so we insure it does not break in the future. |
Yes, working on it. |
@Razican @HalidOdat review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks almost ready to merge :)
@HalidOdat review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go!
This Pull Request tries to fix #344.
This PR needs lots of changes to the way we extract object while recursing. I tried using
match
on theValue
usingas_object()
but this results in a borrow problem since i am passing a&mut Value
towalk
. So at the moment, i am cloning the unwrapped object after checking if it is safe to do so.Need feedback on that.