Skip to content

v2.0.0

Compare
Choose a tag to compare
@danielgtaylor danielgtaylor released this 22 Nov 19:05
· 10 commits to main since this release
v2.0.0
ce8b53e

This is a major rewrite and backward-incompatible change for shorthand v2. See the README for details.

Breaking changes:

The difficult choice to remove some features was made, primarily because after a couple years of use the features were considered confusing by users or saw little to no adoption/usage.

  • Removal of backreferences feature (confusing)
  • Removal of simple scalar arrays shorthand (confusing)
  • Removal of string coercion via ~ (confusing, use quotes instead)
  • Rename shorthand.Get -> shorthand.Marshal (consistency)

New features:

  • Over 20x faster than shorthand v1 🚀
  • Non-map root objects (scalars, arrays, etc)
  • JSON is valid shorthand
  • Binary format support, e.g. CBOR
  • Full-fledged object patching support (inserting, unsetting, swapping, etc)
  • Simple query syntax built-in
  • Great test coverage
  • Fuzz testing
# Comparing new (V2) vs. old (V1)
BenchmarkShorthandV2-12     309817    3825 ns/op    1888 B/op    54 allocs/op
BenchmarkShorthandV1-12      14670   83901 ns/op   36436 B/op   745 allocs/op

What's Changed

Full Changelog: v1.1.0...v2.0.0