Skip to content

Version 0.10.0

Compare
Choose a tag to compare
@jg-rp jg-rp released this 02 Oct 07:12
· 83 commits to main since this release

Breaking Changes

  • We now enforce JSONPath filter expression "well-typedness" by default. That is, filter expressions are checked at compile time according to the IETF JSONPath Draft function extension type system and rules regarding non-singular query usage. If an expression is deemed to not be well-typed, a JSONPathTypeError is raised. This can be disabled in Python JSONPath by setting the well_typed argument to JSONPathEnvironment to False, or using --no-type-checks on the command line. See #33.
  • The JSONPath lexer and parser have been refactored to accommodate #30. As a result, the tokens generated by the lexer and the ATS built by the parser have changed significantly. In the unlikely event that anyone is customizing the lexer or parser through subclassing, please open an issue and I'll provide more details.
  • Changed the normalized representation of JSONPath string literals to use double quotes instead of single quotes.
  • Changed the normalized representation of JSONPath filter expressions to not include parentheses unless the expression includes one or more logical operators.
  • The built-in implementation of the standard length() filter function is now a class and is renamed to jsonpath.function_extensions.Length.
  • The built-in implementation of the standard value() filter function is now a class and is renamed to jsonpath.function_extensions.Value.

Fixes

  • We no longer silently ignore invalid escape sequences in JSONPath string literals. For example, $['\"'] used to be OK, it now raises a JSONPathSyntaxError. See #31.
  • Fixed parsing of JSONPath integer literals that use scientific notation. Previously we raised a JSONPathSyntaxError for literals such as 1e2.
  • Fixed parsing of JSONPath comparison and logical expressions as filter function arguments. Previously we raised a JSONPathSyntaxError if a comparison or logical expression appeared as a filter function argument. Note that none of the built-in, standard filter functions accept arguments of LogicalType.
  • Fixed parsing of nested JSONPath filter functions, where a function is used as an argument to another.
  • Fixed JSONPath bracketed segments. We now handle an arbitrary number of filter selectors alongside name, index, slice and wildcard selectors, separated by commas. See #30.