Comments (1)
From my perspective (and from what I think 'convenience' point of view) it would be nice if all functions returned null
if argument is null
and throw exception if the argument is of wrong type. Usually if an argument has incorrect type means that you have an error in your expression, and if an argument is null
- usually means that your expression is correct but the data lacks something (which is usually ok). Functions throwing if argument is null
means that all the expressions are cluttered with 'fallback' values, e.g. instead of length(a)
you have length(a || '')
(or a && length(a)
) all over the place. It is extremely visible when you have large templates that consist only of JmesPath expressions.
Now, there are some edge cases... E.g. it would be nice if join()
just skipped null
values and automatically converted numbers to strings (and throw if there are some objects or arrays among items).
from jmespath.spec.
Related Issues (20)
- Consider supporting regular expressions HOT 4
- Structured JEPs HOT 12
- Linter/Autoformatter for JEPs HOT 2
- [styling] Consider enabling CSS styling for the site banner HOT 2
- [styling] Consider enabling different semantic classes for the HTML header tags. HOT 2
- [styling] Consider supporting styling for function arguments and results differently than plain text HOT 2
- [styling] Consider keeping the branding of the JMESPath logo HOT 5
- Clean up function example input data
- ABNF: `escaped-char` rule included potentially unwanted `/`(SOLIDUS) character HOT 3
- Empty quoted string should be allowed HOT 1
- Whitespace should be allowed around a JSON value in a backtick literal
- Reconcile JEP-12 and raw-string grammar rule HOT 10
- Why is `{` left-brace character omitted from the `unescaped-literal` rule? HOT 2
- Document pre-JEP-12 legacy syntax for literals
- Consider renaming `JSON hash` or `hash` to the simpler `JSON object`
- Clarification needed for `let()` function behaviour and sub-expressions HOT 1
- Link to https://jmespath.site/specification.html broken (?) HOT 2
- 'foo'[::-1].length(@)
- Fix examples in wiki HOT 4
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 jmespath.spec.