This PR makes a large number of filters from the core library available for general types of values, whereas before, these filters worked only for JSON values.
This builds on the ValT trait introduced in jaq 1.4. However, the functions in jaq_interpret::ValT do not suffice for many operations in the core library, which is why it adds a new jaq_core::ValT trait with a few more functions.
If you want to use the core library with a non-JSON value type, then you have to implement the new jaq_core::ValT trait for your value type.
This PR should not change the behaviour for JSON values, with one exception:
match/1 and match/2 do not create a field name in capturing groups where a name was not given.
Before, a field name would be created and set to null.
This change is because the core library now never creates null values.
The expected impact of this change is small, because .name on a capture group will still return null.
This PR makes a large number of filters from the core library available for general types of values, whereas before, these filters worked only for JSON values. This builds on the
ValT
trait introduced in jaq 1.4. However, the functions injaq_interpret::ValT
do not suffice for many operations in the core library, which is why it adds a newjaq_core::ValT
trait with a few more functions. If you want to use the core library with a non-JSON value type, then you have to implement the newjaq_core::ValT
trait for your value type.This PR should not change the behaviour for JSON values, with one exception:
match/1
andmatch/2
do not create a fieldname
in capturing groups where a name was not given. Before, a fieldname
would be created and set tonull
. This change is because the core library now never createsnull
values. The expected impact of this change is small, because.name
on a capture group will still returnnull
.