Skip to content
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

take better advantage of jsonptr #45

Merged
merged 3 commits into from
Feb 22, 2025

Conversation

asmello
Copy link
Contributor

@asmello asmello commented Oct 18, 2024

jsonptr has been upgraded with more specialised utility functions that this crate reimplements. Let's delegate low-level string manipulation to the source crate and take advantage of the nifty new zero-copy APIs.

Value::Array(ref mut arr) if allow_last && last_unescaped == "-" => Ok(arr.pop().unwrap()),
Value::Array(ref mut arr) => {
let idx = parse_index(last_unescaped, arr.len())?;
// XXX: is this really correct? semantically it seems off, `-` refers to an empty position, not the last element
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@idubrov could you share some context here?

@asmello asmello marked this pull request as ready for review February 18, 2025 18:32
@asmello
Copy link
Contributor Author

asmello commented Feb 18, 2025

@idubrov I finally got around to updating this, sorry for the long turnaround. This is now ready, pending the comment I tagged you on (I think I reproduced the original behaviour but it might be a bug).

@asmello asmello changed the title [wip] take better advantage of jsonptr take better advantage of jsonptr Feb 18, 2025
@idubrov idubrov merged commit 76eb10c into idubrov:main Feb 22, 2025
3 of 4 checks passed
@asmello asmello deleted the am/leverage-jsonptr-more branch February 22, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants