Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Try it out on the online playground: <https://jsonquerylang.org>

## Features

- Small: just `2.9 kB` when minified and gzipped! The JSON query engine without parse/stringify is only `1.3 kB`.
- Small: just `3.0 kB` when minified and gzipped! The JSON query engine without parse/stringify is only `1.4 kB`.
- Feature rich (40+ powerful functions)
- Easy to interoperate with thanks to the intermediate JSON format.
- Expressive
Expand All @@ -34,6 +34,7 @@ On this page:
External pages:

- [Function reference](reference/functions.md)
- [Test Suite](test-suite/README.md)

## Installation

Expand Down Expand Up @@ -623,7 +624,9 @@ Another gotcha is that unlike some other query languages, you need to use the `m

## Development

To develop, check out the repo, install dependencies once, and then use the following scripts:
### JavaScript

To develop, check out the JavaScript repo, install dependencies once, and then use the following scripts:

```text
npm run test
Expand All @@ -637,6 +640,12 @@ npm run build-and-test

Note that a new package is published on [npm](https://www.npmjs.com/package/@jsonquerylang/jsonquery) and [GitHub](https://github.com/jsonquerylang/jsonquery/releases) on changes pushed to the `main` branch. This is done using [`semantic-release`](https://github.com/semantic-release/semantic-release), and we do not use the `version` number in the `package.json` file. A changelog can be found by looking at the [releases on GitHub](https://github.com/jsonquerylang/jsonquery/releases).

### Implement in a new language

Support for JSON Query language can be implemented in new programming languages. Implementing the query engine is most straight forward: this boils down to implementing each of the functions (`sort`, `filter`, `groupBy`, etc.), and creating a compiler which can go through a JSON Query like `["sort", ["get", "name"], "desc"]` look up the function `sort`, and pass the arguments to it. Implementing a parser and stringifier is a bit more work, but the parser and stringifier of the JavaScript implementation can be used as a reference.

There is a JSON based Test Suite available that can be used to ensure that your implementation matches the behavior of the reference implementation, see: [Test Suite](test-suite/README.md).

## Motivation

There are many powerful query languages out there, so why the need to develop `jsonquery`? There are a couple of reasons for this.
Expand Down
49 changes: 49 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"devDependencies": {
"@biomejs/biome": "1.9.3",
"@vitest/coverage-v8": "2.1.2",
"ajv": "8.17.1",
"npm-run-all": "4.1.5",
"semantic-release": "24.1.2",
"typescript": "5.6.3",
Expand Down
Loading