Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glyn/jsonpath-nondeterminism
Generate some non-deterministic testcases for the JSONPath Compliance Test Suite
https://github.com/glyn/jsonpath-nondeterminism
Last synced: about 1 month ago
JSON representation
Generate some non-deterministic testcases for the JSONPath Compliance Test Suite
- Host: GitHub
- URL: https://github.com/glyn/jsonpath-nondeterminism
- Owner: glyn
- License: bsd-3-clause
- Created: 2024-03-02T07:56:33.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-20T02:48:49.000Z (10 months ago)
- Last Synced: 2024-10-14T21:51:16.557Z (3 months ago)
- Language: Haskell
- Size: 32.2 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# JSONPath Non-determinism
This project generates some non-deterministic testcases for the [JSONPath CTS](https://github.com/jsonpath-standard/jsonpath-compliance-test-suite).
For the background to this project, please see my blog post [Testing non-determinism](https://underlap.org/testing-non-determinism).
The approach is to use Haskell's list monad to model the non-determinism in the JSONPath [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535).
To print out some examples, issue:
```
stack run
```To run the tests, issue:
```
stack test
```The current algorithm is very inefficient, so an example and a test are commented out to avoid run times of several minutes. I would welcome any significant performance improvements, especially any which are as readable as (or more readable than!) the current code.
Also, I'd welcome any other improvements as I have limited experience in Haskell.