SpecSheriffIn progress
rule · _guidelines/tools/7.1.1 · s-7zqsstgnuc772ba

A key written twice in one object

Checkedconfirmed by its owner

sheriff validate reads each file it validates as text and counts the keys of each object.

Why

A parser keeps one of the two values and drops the other without a word, so only the text shows a key written twice.

The links it makes

The decisions taken on it

2026-10-21 · textual
Problem

Nothing refused a file whose object holds one key twice. JSON Schema leaves the behaviour of such a document undefined, so it escapes the check that it matches its schema (§s-eferktypcj7njt5), and a tool reading it keeps the last of the two values alone.

Ruling

The owner: the check of the specification refuses it, so a commit cannot carry it.

The tests bound to it