Hacker News new | ask | show | jobs
by cyptus 908 days ago
Is there any standard for describing filters in json like this, or any well known library that is also able to parse this back to expressions?
4 comments

In my humble opinion, it would benefit all better if we standardized something like jql (jira query language, so the user layer) first. From experience, many who find sql too complex have no problem with writing complicated jql queries. it's both easy to use and a great first step to writing actual SQL. I wish it was a standard like json.
The first thing that came to my mind is the mapbox espression language/spec, which uses a very similar format:

https://docs.mapbox.com/style-spec/reference/expressions/

The way the JSON filters work would be directly coupled to the JSON fix notation and SQL infix notation so it's directly coupled to SQL and doesn't really require a standard, imho.