Skip to content

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