v2.0.0
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
- feat: version 2 rewrite by @danielgtaylor in #4
- fix: improved error handling, build action, cleaned deps by @danielgtaylor in #5
- fix: improved query test coverage by @danielgtaylor in #6
- fix: parsing bug with projection query slicing, add test by @danielgtaylor in #7
Full Changelog: v1.1.0...v2.0.0