Releases: vcschapp/bufjson
v0.7.0
Features
- Improve scanning and parsing performance 15X-20X
Material breaking changes
lexical::state::Machineis completely changed, effectively a total rewrite.lexical::ErrorKind::BadSurrogateno longer has theoffsetfield.
Other changes
- Fixed a bug where
PipeAnalyzerwould return an early EOF if given an emptyBytesvalue.
v0.6.2
v0.6.1
v0.6.0
JSON Pointer support
Features added
- Finish supporting streaming JSON Pointer evaluation at scale, via the
pointermodule, by adding/completingpointer::Evaluator.
Breaking changes
- With the introduction of
Token::is_struct,Token::is_punctnow does not include[,],{, or}. (commit0468ba5) - With the introduction of
syntax::Context::struct_kind(), the enumStructis renamed toStructKindfor sanity and reserved-word avoidance. (commitbd7c12ff)
Other changes
- Make
syntax::ErrorKindbothPartialEqandEq(commit36e5841) - Re-organize pre-push hook for more efficient workflows (commits
55b45b0and27550a1) - Run benchmark tests (not the actual benchmarks though) in pre-push hooks (
a402328)
v0.5.3
Preview release of basic JSON Pointer features
This preview release makes available the pointer::Pointer and pointer::Group types. These aren't particularly useful yet because the streaming JSON Pointer evaluation features haven't been built yet, but these are coming soon.
v0.5.2
v0.5.1
This change updates the documentation that shows up on docs.rs so that:
- All features are enabled for the purposes of documentation.
- Items that are only available on a feature flag are automatically annotated as such.
This makes the docs.rs documentation more valuable since it allows the full feature set to be browsed, even if some feature flags aren't on by default.
v0.5.0
Breaking Changes
-
d2f8656 - Replace
Cow<'_, str>with newUnescapedtype inContenttrait.Unescapedacts similarly to aCow<'_, str>but works with arbitrary string representations including representations where the representation in memory is non-contiguous. (i.e. some kind ofBuf).- This enables the low-allocation, low-copy stream parsing of
ReadAnalyzer, as well as future similar async functionality.
-
d2f8656 - Introduce
Literalassociated type intoContenttrait.- A
Content::Literalmust beIntoBuf. - This enables the outputs from all lexical analyzers, including
ReadAnalyzer, to be described in a general way and will ensure that tokens from any lexical analyzer can be evaluated by the upcoming JSON Pointer module.
- A
Material Non-Breaking Changes
-
71ab8b4, d2f8656 - Introduce the
Buftrait, to support no-copy parsing of streams- Added
Buftrait for efficient zero-copy buffer operations - Added
IntoBuftrait for converting types intoBufimplementations - Added
StringBuftype implementingBufforString - Added
BufUnderflowerror type - Added
buf_cmpfunction for comparingIntoBufvalues
- Added
-
b874196 - Make
lexical::unescapefullypub- Made
lexical::unescapefunction publicly available for standalone use - Users can now use the unescape functionality independently of the full lexical analysis stack
- Made
-
05e7cbe - Generalize
lexical::unescapeto operate on aBuf, not a&str- By operating on values that are
IntoBuf,unescapecan be used in a wider range of use cases, such as expanding JSON escape sequences from string values that are not stored contiguously in memory because they span buffers.
- By operating on values that are
-
d2f8656 - Add lexical analyzer for
std::io::Readstreams:ReadAnalyzer- Added new
lexical::readmodule withReadAnalyzerfor tokenizingstd::io::Readstreams - Added
Literal,Content, andErrortypes specific to ReadAnalyzer - Added
readfeature flag toCargo.toml(disabled by default)
- Added new
-
d2f8656 - Add traits
EqStrandOrdStrto capture the property of "being comparable to a string slice"- If a type
Timplements these traits thenUnescaped<T>can be compared to&str
- If a type
v0.4.0
Breaking Changes
- Fixed bug: Number exponent parsing (commit
cc3873c):- Breaking because some
lexical::Expectenum members are renamed. - Fixed uppercase 'E' not being recognized as exponent character
- Improved error reporting for number parsing edge cases
- Breaking because some
- Added more convenience methods to
Token(commitedcb726):- Breaking because some
Token::is_*methods were renamed for better precision. - Added new convenience methods:
Token::is_literal,Token::is_pseudo,Token::is_terminal
- Breaking because some
- Removed
mutfrom&self inContent::unescaped(commit3287766):- Soft breaking change because it could cause compiler warnings to sprout, and that can break builds that prohibit warnings.
- This makes the
Contentinterface cleaner and easier to use.
Material Non-Breaking Changes
- Fixed bug: Error message parts ran together due to no space (commit
d46256a):- Fixed missing space in error messages between expected character and token context
v0.3.0
Breaking Changes
- Improved content fetch interface ergonomics (commit
7b92405):- Replaced
lexical::Analyzer::content()andParser::content()methods that returnedResultwith a three-method approach:fn content(&self) -> Content- panics on error tokenfn err(&self) -> Error- panics on non-error tokenfn try_content(&self) -> Result<Content, Error>- original behavior
- This eliminates the need for unwieldy
.unwrap()and.unwrap_err()calls in parsing loops
- Replaced
- Renamed
BufAnalyzertoFixedAnalyzer(commitf8d9891):- Renamed the main lexical analyzer type to better reflect its purpose (analyzing fixed-size buffers)
- Reduces confusion with the crate name and provides more descriptive naming
- Improved
Content::unescapedergonomics (commit0c33fcb):- Changed
Content::unescapedmethod signature from&mut self -> &str to &mut self -> Cow<'_, str> - Returns
Cow::Borrowedwhen no unescaping is needed,Cow::Ownedwhen it expanded at least one escape sequence.
- Changed
Material Non-Breaking Changes
- Reduced
fixed::Content(formerlybuf::Content) size from 48 to 32 bytes (commit0c33fcb) - Added
Pos::new()constructor (commit4f0527b):- Added convenience constructor for creating
Posinstances:Pos::new(offset, line, col) - Improves testing ergonomics because it's a shorter "phrase"
- Added convenience constructor for creating
- Made
Token::static_content()aconst fn(commit0cf5efb): - Added module-level documentation for
mod lexical(commit48e1025): - Switched from MIT license to dual MIT and Apache-2.0 (commit
ad3f963): - Updated README (commits
4b09f21,746e335,0bd677f):
Full Changelog: v0.2.0...v0.3.0