-
Issue - Allow comparison of Numeric types (includes Float).
-
Issue - Add jmespath.rb to gemspec executables.
- Issue - Use
JSON.parse
instead ofJSON.load
.
- Feature - Add support for string comparisons.
-
Support implicitly convertible objects/duck-type values responding to
to_hash
andto_ary
.
-
Update the bundled compliance tests. Fix the 6 failing test cases that result from updating the test suite. Test failures included parsing errors and returning nil when comparing non-nil values.
-
Fix typo of a license name in gemspec.
-
Test against Ruby 2.4 in Travis.
-
Add support for floating point comparisons.
- Bug fix for users that have a 2.0.1+ version of the
json_pure
gem loaded in their environment prior to requiringjmespath
.
-
Restored support for legacy unquoted string literals.
-
Improved error handling for invalid JSON values.
-
Optimised false checks.
-
Removed depdendency on
pure_json
gem. Necessary code changes have been made to ensure things work properly with Ruby 1.9.3 and JSON 1.5.5. -
Bug-fix for Ruby 2.3. JMESPath requires sort and sort_by functions to be stable. There was a persistent test failure in Ruby 2.3 due to an unstable sort.
-
Will no longer require json_pure if the json gem has already been loaded. This will result in a warning and a degraded experience if json < 1.8.1 has already been loaded.
Mixing json/pure with json/ext results in json errors, for example:
some_hash = { 'jsonrpc' => 'abc', 'jsonversion' => 1 } some_hash.to_json #=> raises a JSON::Pure::Generator::State TypeError
-
Removed hard dependency on
json >= 1.8.1
. Replaced withjson_pure >= 1.8.1
. The runtime will still attempt to load the faster gem, if availble and will fall back onjson_pure
for compatability. Ruby 2.0+ ships with 1.8.1 by default, so only Ruby 1.9.3 will default to the slower version.
- Minor change in require order.
-
Errors caused by invalid function arguments normally raise an arity or argument error. You can now prevent
JMESPath.search
from raising these errors by passingdisable_visit_error: true
.JMESPath.search(expression, data, disable_visit_errors: true)
This will cause these functions to return a null/nil value instead.
-
Fix for Ruby 1.9.3. Older versions of Ruby ship with a version of the json gem that can not perform the following:
JSON.load('1')
This results in the JMESPath library in assuming is parsing an unknown or invalid token. This works fine newer versions of Ruby. To resolve this issue the library is forcing a newer version of the
json
gem. -
Fix for boolean truthy checks. See related GitHub issue #15.
-
Updated code to pass the latest shared compliance tests.
-
Added support for the
map
function. -
Added support for JEP-9, including unary filter expressions, and
&&
filter expressions.
- Removed json gem dependency.
- Resolved an issue preventing eager autoloading of comparator classes.
- Fix for Ruby version 1.9.3 which does not support
#[]
onEnumerable
from Ruby stdlib.
-
Updated the compliance tests. Pulled in the latest version from https://github.com/jmespath/jmespath.test/commit/47fa72339d0e5a4d0e9a12264048fc580ed0bfd8.
-
Adds a new JIT-friendly interpreter and AST optimizations that evaluating expressions faster.
-
Removed dependency on
multi_json
. -
Now running compliance tests as part of release process.
- Added a copy of the Apache 2.0 license to the project and now now bundling the license as part of the release.
- Bug-fix, when accessing Struct objects with an invalid member
nil
is now returned, instead of raising an error.
-
The expression cache now has a maximum size.
-
Documented the
rake benchmark
andrake benchmark:cached
tasks. -
You can now disable expression caching when constructing a Runtime by passing
:cache_expressions => false
. Caching is still enabled by default.# disable caching runtime = JMESPath::Runtime.new(cache_expressions: false) runtime.search(expression, data)
-
Adding a missing require statement for Pathname to the JMESPath module.
-
Addded support for searching over hashes with symbolized keys and Struct objects indifferently
# symbolized hash keys data = { foo: { bar: { yuck: 'value' } } } JMESPath.search('foo.bar.yuck', data) #=> 'value' # Struct objects data = Struct.new(:foo).new( Struct.new(:bar).new( Struct.new(:yuck).new('value') ) ) JMESPath.search('foo.bar.yuck', data) #=> 'value'
-
Added a simple thread-safe expression parser cache; This significantly speeds up searching multiple times with the same expression. This cache is enabled by default when calling
JMESPath.search
-
Added simple benchmark suite. You can execute benchmarks with with
rake benchmark
orCACHE=1 rake benchmark
; Caching is disabled by default in the benchmarks.
- Passing all of the JMESPath compliance tests.