Comments (2)
Same issue, my workaround is to change the regex used in t_SORT_DIRECTION. It probably breaks features using t_SORT_DIRECTION.
from jsonpath_ng.ext import parse
from jsonpath_ng.ext.parser import ExtendedJsonPathLexer
ExtendedJsonPathLexer.t_SORT_DIRECTION.__doc__ = r',?\s*(//|\\)' # replace r',?\s*(/|\\)' by r',?\s*(//|\\)'
jsonpath_expr = parse('$.A / 80', debug=True)
jsonpath_expr.find({'A': 160})
[DatumInContext(value=2.0, path=This(), context=None)]
from jsonpath-ng.
I have the same issue and my workaround so far has been to multiply by the inverse. So instead of A / 80
, I do A * 0.0125
, because 1/80=0.0125.
However this will also result in a parse error, when both sides are just numberic values, as in 2 * 0.0125
.
from jsonpath-ng.
Related Issues (20)
- getting JsonPathParserError('Parse error at %s:%s near token %s (%s)' error. HOT 1
- update_or_create fails when root object of original object is a list
- Can I register custom functions? HOT 2
- Getting error `Unexpected character: ?` while trying to evaluate a jsonpath HOT 3
- 1.5.3 tag is missing from github HOT 2
- jsonpath filter not recognized
- Parser failed to understand syntax '$.anykey.~'. error message: Parse error at 1:12 near token ~ (~) HOT 2
- Filter does not behave correctly HOT 2
- [Feature Request] Support executing with -OO or OPTIMIZE=2 HOT 2
- jsonpath_ng.exceptions.JsonPathParserError: Parse error at 1:37 near token 1 (NUMBER) HOT 1
- jsonpath-ng does not recognize same expressions as jsonpath.com and jsonpath-python
- `decorator` dependency is unused HOT 1
- [bug] computer memory leak HOT 2
- json-path with slash results in: jsonpath_ng.exceptions.JsonPathLexerError: Error on line 1, col 10: Unexpected character: / HOT 2
- && not supported in JSONPath HOT 2
- What is the state of this project? HOT 1
- error in JsonExtendedParser HOT 1
- jsonpath_ng.exceptions.JsonPathLexerError - Unexpected character: ? HOT 2
- Performance Improvement HOT 11
- BUG: Unable to parse the JSON schema for LlamaIndex when there is a space in dictionary key HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonpath-ng.