https://github.com/cucumber/cucumber-json-converter
Parse Cucumber JSON from most Cucumber implementations and versions
https://github.com/cucumber/cucumber-json-converter
javascript polyglot-release tidelift
Last synced: 3 months ago
JSON representation
Parse Cucumber JSON from most Cucumber implementations and versions
- Host: GitHub
- URL: https://github.com/cucumber/cucumber-json-converter
- Owner: cucumber
- License: mit
- Created: 2017-09-12T16:10:49.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T14:23:55.000Z (6 months ago)
- Last Synced: 2024-10-29T14:46:53.582Z (6 months ago)
- Topics: javascript, polyglot-release, tidelift
- Language: TypeScript
- Homepage:
- Size: 1.73 MB
- Stars: 6
- Watchers: 5
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Cucumber JSON Converter
This library converts Cucumber JSON from multiple implementations and versions into a JavaScript object with
a strict schema.## Usage
```typescript
import { convert } from '@cucumber/cucumber-json-converter'const ob = JSON.parse(jsonFromAnyCucumberImplementation)
const cucumberJsonObject = convert(ob)
```The `convert` function will throw an error if it fails to recognize the object as a valid Cucumber JSON object.
## Motivation
The "Cucumber JSON" format was created several years before the [JSON Schema](https://json-schema.org/) standard started gaining traction. The lack of a formal schema led to inconsistencies between different Cucumber implementations and releases.
This library contains JSON Schemas for multiple implementations and versions of Cucumber.
These schemas have been retrofitted to match the actual output of these implementations.