Skip to content

Releases: vcschapp/bufjson

v1.1.0

15 Jun 23:36

Choose a tag to compare

Material non-breaking changes

The API surface area was increased slightly by adding Clone implementations for FixedAnalyzer and Parser.

Thanks to @JeremyMoeglich for this contribution. It opens up interesting use cases because it allows the parser state to be forked without consuming any extra memory (as long as the buffer passed to FixedAnalyzer has a zero-copy clone).

Other changes

  • Completed documentation for lib.rs.
  • Other documentation clean-up.

v1.0.1

12 May 16:07

Choose a tag to compare

Material non-breaking changes

  • Re-export lexical::Token into the crate root for convenience.
  • Hide lexical::NumError behind the num feature. This is technically breaking, but only because lexical::NumError slipped through in v1.0.0. Because NumError is only usable with the num feature, and this is such a fast follow, it's unlikely anyone can in fact be broken.

Other changes

  • Various changes to improve crate documentation and discoverability.

v1.0.0

30 Apr 18:48

Choose a tag to compare

Material breaking changes

  • Introduced a no_std feature. This change was mostly unintrusive, but did result in interfaces changes in the lexical::read package:
    • ReadAnalyzer now bounds on a new read::Read trait instead of std::io::Read.
    • ReadAnalyzer error type is now generic: read::Error became read::Error<E>.

Material non-breaking changes

  • Explicitly specified a default feature, with default = ["std"] so that the new no_std feature is off by default.
  • Introduced number parsing gated behind the num and num_ext features. These are partly pure convenience methods, but they also allow no-allocation, no copy number token parsing so they also provide a performance benefit.
    • On the lexical::Content trait: Content::parse_i64, Content::parse_u64, etc.
    • As free functions: lexical::parse_i64, lexical::parse_u64, etc.
  • Introduced zero-allocation comparison with escape sequence expansion.
    • On the lexical::Content trait: Content::unescaped_cmp.
    • As a free function: lexical::unescaped_cmp.
  • Added a convenience trait, Sink, to make it easier to extract the full contents of a Buf value. The signature of lexical::unescape changes to accept a Sink, but it is expected this will be a non-breaking change since there is a Sink implementation for Vec<u8>.

Other changes

  • Significantly the README.md.
  • Added throughput comparison benchmarks for other JSON-related crates: simd-json, json-streaming, and struson.
  • Added a COMPARE.md that makes it easier to compare bufjson with other crates in the JSON ecosystem.
  • Reduced allocation in ReadAnalyzer, removing a layer of heap allocation/indirection in the MultiBuf case. No API change, this is purely an internal optimization.
  • Inline attribute audit. Calibrated #[inline] and #[inline(always)] across the public API for better cross-crate optimization.
  • Various minor documentation improvements.
  • Various minor housekeeping.

v0.7.4

22 Apr 16:09

Choose a tag to compare

v0.7.4 Pre-release
Pre-release

Material breaking changes

  • Removed two members of the syntax::Expect enumeration as part of commit 22dcd97. It turned out they weren't used as distinct entities in the parser's state machine table. (Due to this being an enum that's very unlikely to be directly used at the present time, it was decided to go with a patch version bump from v0.7.3 to v0.7.4 despite this technical breaking change.)

Other changes

  • Make small optimization to the JSON Pointer evaluator's escape expansion path.
  • Make small improvements to the docs.
  • Fix bugs in scripts/verify.sh and correctly ensure it runs both the regular tests, including doctests, and the benchmark tests.
  • Add the benchmark tests and run the actual benchmarks on Git push.
  • Fix a broken doctest.
  • Increase unit test coverage.
  • Remove dead code.
  • Add additional metadata to Cargo.toml.

Full Changelog: v0.7.3...v0.7.4

v0.7.3

14 Apr 22:31

Choose a tag to compare

v0.7.3 Pre-release
Pre-release

Material changes

  • Add Evaluator::next_end method for parity with parser.

Other changes

  • Increase test coverage.
  • Tweak docs.
  • Update benchmarks to compare with json-streaming crate.

v0.7.2

10 Apr 23:58

Choose a tag to compare

v0.7.2 Pre-release
Pre-release

Material non-breaking changes

  • Increase PipeAnalyzer performance about 20% by giving it its own "native" implementation rather than piggybacking on ReadAnalyzer.
  • Fix bug in Parser::next_end.

Material breaking changes

None

Other changes

  • Fix bug in ReadAnalyzer where a Hash assumed chunk invariance.
  • Add benchmark for PipeAnalyzer.
  • Expose pipe module in the documentation and include benchmark results.

v0.7.1

02 Apr 18:29

Choose a tag to compare

v0.7.1 Pre-release
Pre-release

Material non-breaking

  1. b14087d — New public API: Parser::next_end() — skips all content within the current structured value (array/object) and returns the closing token. Enables efficient skipping of unneeded subtrees.

  2. c436702 — ~3% performance improvement to FixedAnalyzer by simplifying the hot path (replacing match/jump table with direct assignment, shrinking StoredContent).

  3. b412a2e — 8-14% performance improvement to Parser::next() by replacing the match-driven approach with a table-driven lookup.

  4. 15945a1 — 4-7% performance improvement to Parser::next() by eliminating a local Content variable that was causing the compiler to emit an unnecessary drop guard.

  5. 9dfb704 — ~0.5-1% performance improvement from refactoring parser stack pop.

  6. eb0724a — ~5% performance improvement to Parser::content() fetch path.

Other non-breaking

  1. 855dba6 — Finish documenting pipe module.

  2. 08ebf3a — Finish documenting state module.

  3. 07a42f4 — Parser lookup table tweak eliminating .peek() calls for non-structured values inside arrays/objects.

  4. c5c88fb — Limit size-of assertions to 64-bit systems to prevent spurious build failures on 32-bit targets.

v0.7.0

25 Mar 04:02

Choose a tag to compare

v0.7.0 Pre-release
Pre-release

Features

  • Improve scanning and parsing performance 15X-20X

Material breaking changes

  • lexical::state::Machine is completely changed, effectively a total rewrite.
  • lexical::ErrorKind::BadSurrogate no longer has the offset field.

Other changes

  • Fixed a bug where PipeAnalyzer would return an early EOF if given an empty Bytes value.

v0.6.2

17 Mar 17:23

Choose a tag to compare

v0.6.2 Pre-release
Pre-release
  • Minor updates to documentation.
  • Fixed a deadlock issue in PipeAnalyzer doctests.

v0.6.1

15 Mar 19:18

Choose a tag to compare

v0.6.1 Pre-release
Pre-release
  • Rough implementation of pipe module and PipeAnalyzer for asynchronous parsing.
  • Minor bug fix in read::ReadAnalyzer buffer management.