# @cucumber/cucumber-json-converter

> Validates and converts Cucumber JSON for different Cucumber implementations and versions

Latest version **0.2.0** (published 2026-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cucumber/cucumber-json-converter
pnpm add @cucumber/cucumber-json-converter
yarn add @cucumber/cucumber-json-converter
bun add @cucumber/cucumber-json-converter
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2026-07-27 |
| First published | 2022-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 108.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | Cucumber Limited |
| Maintainers | cukebot |
| Keywords | cucumber, steps, regexp, regex |

## Links

- npm: https://www.npmjs.com/package/@cucumber/cucumber-json-converter
- Repository: https://github.com/cucumber/cucumber-json-converter
- Homepage: https://github.com/cucumber/cucumber-json-converter#readme
- Issues: https://github.com/cucumber/cucumber-json-converter/issues
- npm.io page: https://npm.io/package/@cucumber/cucumber-json-converter

## Dependencies (2)

- [ajv](https://npm.io/package/ajv.md) 8.20.0
- [@cucumber/json-schema](https://npm.io/package/@cucumber/json-schema.md) ^0.2.5

## Recent versions

- 0.2.0 (latest) — 2026-07-27
- 0.1.0 — 2024-04-09
- 0.0.3 — 2022-03-23
- 0.0.1 — 2022-03-23

## 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.

---
_Source: https://npm.io/package/@cucumber/cucumber-json-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
