jsonptr
Data structures and logic for resolving, assigning, and deleting by JSON Pointers (RFC 6901)
0.8.2
66M downloads/mo
#1048 most downloaded on crates.io
chanced/jsonptr
What this package is like to depend on
Last release 3 days ago
20 Aug 2026
Ships unpredictably
gaps range from 9 days to 1.4 years
Some releases are documented
notes for 18 of 36 stable releases
5 versions withdrawn
withdrawn after publishing
4 years old
41 releases · first in 2022
3 releases in the last 12 months
see the full history below
Release timeline
41 releases · Jun 2022 to Aug 2026Releases
latest 41-
0.8.220 Aug 2026Release notes
Open source →Fixed
- Fixed
Token::from_encodedaccepting a~immediately followed by another~(e.g."~~0") as valid, letting safe code build aPointerBufthatPointer::parsethen rejected on the same bytes. A~must now always be followed by0or1. Resolves #128.
- Fixed
-
0.8.126 Jul 2026Release notes
Open source →Added
- Added
Token::into_encoded, which consumes theTokenand returns its encoded string representation as aCow<'a, str>without allocating. Resolves #115. ReplaceError(returned byPointerBuf::replace) is now re-exported from the crate root, so callers can actually name the type.
Changed
- Resolved all
clippy(clippy::all+clippy::pedantic) andrustclint warnings across the full feature powerset — including newer-toolchain lints (mismatched_lifetime_syntaxes) and feature-combination dead-code warnings. Internal only; no public API changes.
Fixed
- Fixed several broken/stale intra-doc links (a
crate::asigntypo, an "RFC 6091" typo, staletomldocs.rs links pointing at 0.8 instead of 0.9) and a doc comment onPointer::lenthat used//instead of///and was silently dropped from rendered docs.
- Added
-
0.8.026 Jul 2026Release notes
Open source →Added
- Adds
Pointer::split_at_offset, the byte-offset-based replacement for the now-deprecatedPointer::split_at.
Deprecated
- Deprecated
ResolveErrorname. - Deprecated
Pointer::split_atin favor ofPointer::split_at_offset. Thesplit_atname is being reserved so it can be reintroduced as a position (index) based split by 1.0, consistent with the rest of the API (e.g.Pointer::get).
Fixed
Delete::deleteno longer panics when a pointer's final token resolves to an array index equal to the array's length (e.g.-on any array, or a numeric index equal to the length). It now returnsNoneand leaves the document unmodified, as documented. Fixes #120.EncodingErrorandParseIndexErrornow implementDiagnostic, which unifies the API for errors originating from parse-like operations.- Fixes returning an incorrect error type when parsing a
Tokenthat terminates with~. This now correctly classifies the error as aTildeerror. - Disabled default features for the
serdedependency, which enables using this library in no-std environments even with theserdefeature enabled.
Removed
- Some methods were removed from
InvalidCharacterError, as that type no longer holds a copy of the input string internally. This is a breaking change. To access equivalent functionality, use theDiagnosticAPI integration.
Changed
Token::from_encodednow accepts owned or borrowed strings (any type that implementsInto<Cow<'_, str>>).- Sealed the
Diagnosetrait. - Implementation of the
Defaulttrait forPointernow doesn't constrain the lifetime.
- Adds
-
0.7.116 Feb 2025Release notes
Open source →Changed
- Removes accidentally enabled default features
"miette"and"toml"
- Removes accidentally enabled default features
-
0.7.013 Feb 2025 withdrawnRelease notes
Open source →- Renames
crate::resolve::ResolveErrortocrate::resolve::Error - Adds type alias
crate::resolve::ResolveErrorforcrate::resolve::Error - Renames
crate::assign::AssignErrortocrate::assign::Error - Adds type alias
crate::assign::AssignErrorfor crate::assign::Error` - Adds
position(token index) to variants ofassign::Error&resolve::Error
Co-authored-by: André Mello [email protected]
Release notes
Open source →Added
- Adds method
into_bufforBox<Pointer>andimpl From<PathBuf> for Box<Pointer>. - Adds unsafe associated methods
Pointer::new_uncheckedandPointerBuf::new_uncheckedfor external zero-cost construction. - Adds
Pointer::starts_withandPointer::ends_withfor prefix and suffix matching. - Adds new
ParseIndexErrorvariant to express the presence non-digit characters in the token. - Adds
Token::is_nextfor checking if a token represents the-character. - Adds
InvalidEncodingto represent the two possible encoding errors when decoding a token. - Adds
diagnotic::Diagnostictrait to facilitate error reporting andmietteintegration. All errors intended for usage withassign::Assignorresolve::Resolvemust implement this trait. - Adds
diagnostic::Report<T>to capture the input forPointerBuf::parseand to facilitatemietteintegration for all errors. - Adds
"miette"feature flag to enablemietteintegration for error reporting.
Changed
Pointer::getnow accepts ranges and can producePointersegments as output (similar toslice::get).- Bumps minimum Rust version to 1.79.
PointerBuf::parsenow returnsRichParseError, an alias toReport<ParseError>which contains the allocated string as well as the error. UseReport::originalfor matches or `Report::- Renames
ParseError::NoLeadingBackslashtoParseError::NoLeadingSlash(sorry for the churn, I spaced hard - @chanced). - Adds field
positionto variants ofresolve::Errorandassign::Errorto indicate the token index of where the error occurred. - Renames
ParseError::is_no_leading_backslashtoParseError::is_no_leading_slash. - Renames
assign::AssignErrortoassign::Error - Renames
resolve::ResolveErrortoresolve::Error - Renames
InvalidEncodingErrortoEncodingError
Fixed
- Make validation of array indices conform to RFC 6901 in the presence of non-digit characters.
Deprecated
ParseError::is_no_leading_backslashrenamed toParseError::is_no_leading_slash.assign::AssignErrorrenamed toassign::Errorresolve::ResolveErrorrenamed toresolve::ErrorInvalidEncodingErrorrenamed toEncodingError
- Renames
-
0.6.301 Oct 2024Nothing published for this version
-
0.6.230 Sep 2024 withdrawn -
0.6.126 Sep 2024Nothing published for this version
-
0.6.010 Aug 2024Release notes
Open source →Fixed
Token::to_indexnow fails if the token contains leading zeros, as mandated by the RFC.
Changed
ParseIndexErroris now an enum to reflect the new failure mode when parsing indices.
-
0.5.110 Jul 2024 -
0.5.010 Jul 2024 -
0.4.718 Mar 2024 -
0.4.604 Mar 2024 -
0.4.523 Feb 2024Release notes
Open source →Fixed
- Fixes issue with
Pointer::push_backthat does not allow for empty strings to be appended as tokens. #21 fixed by @wngr
- Fixes issue with
-
0.4.413 Oct 2023Nothing published for this version
-
0.4.320 Aug 2023Release notes
Open source →Added
- Adds
parsemethod toPointerwhich calls the currently existingFromStrimpl
- Adds
-
0.4.223 Jun 2023 -
0.4.122 Jun 2023 -
0.4.031 May 2023Release notes
Open source →Added
- Adds
CHANGELOG.mdwhich will be better upkept moving forward. - Adds
MaybePointerto assist with deserialization which should not fail fast.
Changed
Pointer::newnow accepts a generic list, so&["example"]can be replaced by["example"]. For untyped, empty slices (i.e.Pointer::new(&[])), usePointer::default().stdis now enabled by default.
Removed
- Removes optional
MalformedPointerErrorfromPointer.
- Adds
-
0.3.623 May 2023Release notes
Open source →Changed
- Adds quotes around
Pointerdebug output (#11)
Fixed
- Adds missing
impl std::error::ErrorforError,NotFoundError,MalformedError - Fixes build for
stdfeature flag
- Adds quotes around
-
0.3.513 May 2023Nothing published for this version
-
0.3.411 May 2023Release notes
Open source →Added
- Adds feature flag
fluent-uriforFrom<fluent_uri::Uri<_>impl (#3)
- Adds feature flag
-
0.3.318 Mar 2023Nothing published for this version
-
0.3.224 Feb 2023 withdrawnNothing published for this version
-
0.3.124 Feb 2023 withdrawnNothing published for this version
-
0.3.024 Feb 2023 withdrawnNothing published for this version
-
0.2.024 Feb 2023Release notes
Open source →Changed
stdis now optional- Adds feature flags
"uniresid","url"to enable implementingFrom<Uri>,From<Url>(respectively).
Removed
- Removes
Cargo.lock - Makes
uniresidandurioptional
-
0.1.530 Jun 2022Nothing published for this version
-
0.1.430 Jun 2022Nothing published for this version
-
0.1.330 Jun 2022Nothing published for this version
-
0.1.222 Jun 2022Nothing published for this version
-
0.1.116 Jun 2022Nothing published for this version
-
0.1.012 Jun 2022Release notes
Open source →Fixed
- Fixes root pointer representation
""rather than the erroneous"/" - Fixes an issue where encoded tokens were not being resolved properly
- Fixes root pointer representation
-
0.0.812 Jun 2022Nothing published for this version
-
0.0.709 Jun 2022Nothing published for this version
-
0.0.609 Jun 2022Nothing published for this version
-
0.0.507 Jun 2022Nothing published for this version
-
0.0.407 Jun 2022Nothing published for this version
-
0.0.307 Jun 2022Nothing published for this version
-
0.0.207 Jun 2022Nothing published for this version
-
0.0.102 Jun 2022Nothing published for this version