Skip to content

Releases: theory/jsonpath

Release v0.9.0

05 May 18:29
v0.9.0
8db3053
Compare
Choose a tag to compare

⚡ Improvements

  • Significantly refactored the spec package toward greater stability, usability, and increased comprehensibility. The names of things are more consistent, the APIs more legible and user-friendly. Quite a few types were renamed or merged.
  • Added support for json.Number values to complement the existing support for Go core numeric types. This should allow for transparent handling of values marshaled with json.Decoder.UseNumber enabled.
  • Moved the function extension types from the registry to the spec package, simplifying registry and the handling of function extensions, without changing the interface for using a registry or adding extensions to it.

📚 Documentation

  • Vastly expanded the spec package documentation to make it much more thorough and accurate, with copious links to relevant parts of RFC 9535 and complete lists of interface implementations and examples for each significant type.
  • Removed the "Package Stability" statement from the README, as all packages are considered stable or else potentially unstable types in the spec package have been labeled as such.
  • Fixed links and typos in the main package documentation, and moved the registry example under WithRegistry.
  • Replaced the spec.Wildcard variable with a the function spec.Wildcard().

📔 Notes

  • Upgraded the compliance test suite and integrated its located path test expectations. All tests passed, no changes required.

🆚 For more detail compare changes since v0.4.1.

Release v0.4.1

02 May 22:13
v0.4.1
07db8e4
Compare
Choose a tag to compare

🪲 Bug Fixes

  • Fixed the panic messages from spec.Slice to properly report coming from Slice and not NewSlice.

📔 Notes

  • Upgraded to and fixed issues reported by golangci-lint v2.1.5.
  • Added TinyGo testing on Go v1.24.

🆚 For more detail compare changes since v0.4.0.

Release v0.4.0

15 Jan 17:01
v0.4.0
338abf6
Compare
Choose a tag to compare

⚡ Improvements

  • Added the Pointer method to NormalizedPath. It returns an RFC 9535 JSON Pointer string representation of the normalized path.

🆚 For more detail compare changes since v0.3.0.

Release v0.3.0

28 Dec 23:31
v0.3.0
e86c33a
Compare
Choose a tag to compare

⚡ Improvements

  • Added SelectLocated. It works just like Select, but returns LocatedNodes that pair the selected nodes with RFC 9535-defined NormalizedPaths that uniquely identify their locations within the JSON query argument.
  • Added LocatedNodeList, the return value from SelectLocated. It contains methods for working with the selected nodes, including iterators for its nodes & NormalizedPaths, deduplication, sorting, and cloning.
  • Added Compare to NormalizedPath, which enables the sorting of LocatedNodeLists.

📔 Notes

  • Requires Go 1.23 to take advantage of its iterator support.
  • Changed the return value of Select from []any to NodeList, which is an alias for []any. Done to pair with LocatedNodeList, the return value of SelectLocated. Features an All method, which returns an iterator over all the nodes in the list. It may gain additional methods in the future.

📚 Documentation

  • Added Select, SelectLocated, NodeList, and LocatedNodeList examples to the Go docs.

🆚 For more detail compare changes since v0.2.1 .