Skip to content

Version 2.2.0

Choose a tag to compare

@jg-rp jg-rp released this 05 Jul 08:26
· 6 commits to main since this release

Fixes

  • Fixed lexing of quoted name selectors ending in an escaped backslash, like $['a\\']['b']. The lexer's look-behind for the closing quote treated a quote following an escaped backslash (\\) as an escaped quote (\'), so these selectors failed to tokenize. This also broke the RFC 9535 normalized path round-trip: normalized paths produced for object keys containing backslashes could not be parsed back. See #132.
  • Fixed atomic JSONPatch application when a patch op replaces the document root.

Features

  • Added patch.patched(ops, data) and JSONPatch.patched(data). patched() is a non-mutating form of JSONPatch application. It always performs a deep copy of data and returns the patched copy. See #131.