Measurement JSON Schema — Units as Annotations (.json)
A 2020-12 JSON Schema for the absorbance rows, carrying the physical unit and coverage factor as custom annotation keywords beside the standard type and range constraints. Annotations like these are ignored by validators and read by humans and tooling, which is precisely the contract being tested.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.invalid/novus/scientific/measurement-schema.json",
"title": "Spectrometer absorbance row",
"description": "Column contract for the paired absorbance CSV, including physical units.",
"type": "object",
"required": [
"wavelength_nm",
"absorbance_AU",
"u_absorbance_AU_k2",
"instrument_id"
],
"additionalProperties": false,
"properties": {
"wavelength_nm": {
"type": "number",
"unit": "nm",
"minimum": 190,
"maximum": 1100
},
"absorbance_AU": {
"type": "number",
"unit": "AU",
"minimum": -0.1,
"maximum": 4.0
},
"u_absorbance_AU_k2": {
"type": "number",
"unit": "AU",
"minimum": 0,
"coverageFactor": 2,
"confidenceLevel": "95%"
},
"blank_corrected": {
"type": "boolean"
},
"instrument_id": {
"type": "string",
"pattern": "^NX-[A-Z]+-SYNTH-[0-9]{2}$"
},
"flag": {
"type": "string",
"enum": [
"ok",
"near_saturation",
"saturated",
"suspect"
]
}
}Specifications
- Dialect
- JSON Schema 2020-12
- Properties
- 6
- Required Properties
- 4
- Unit Annotations
- custom 'unit' keyword on three properties
- Coverage Factor Annotation
- true
- Additional Properties
- false
- Describes
- the spectrometer absorbance CSV
Testing contract
Expected to pass- Scenario
- Validate one row of the paired absorbance CSV against this schema, then read the unit annotation for absorbance_AU.
- Expected result
- A conforming row validates, a row with an extra column fails on additionalProperties, and the unit annotation reads 'AU' with u_absorbance_AU_k2 declaring coverageFactor 2.
What is a .json file?
JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.
How to use this file
Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.
How to use this file for testing
“Measurement JSON Schema — Units as Annotations (.json)” is a deterministic Novus Examples fixture for Scientific data, Schema validation, Editor testing. Citation catalogs (BibTeX, RIS), chemistry structures (MDL Molfile, PDB), and gridded binary data (NetCDF, FITS) — for testing reference managers, molecule viewers, and scientific-data loaders.
Documented properties for this file: JSON · 1,158 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Scientific fixtures are small, valid, and fully synthetic — no real organism, patient, sample, or observation. Point your parser or loader at the file and check it reads the documented records, variables, or headers; binary formats ship a readable twin or metadata listing for comparison.
Code examples
import json
with open("measurement-schema.json") as f:
data = json.load(f)
print(type(data), len(data))Related files
- csvCensored Values and Detection Limits — Non-Numeric Results (.csv)Nine laboratory results where only four are plain numbers: two are below the detection limit, one is above range, two are missing in different spellings, and one is a legitimate small negative near the blank. Coercing the censored strings to numbers or to NaN both bias the summary, and the file distinguishes every case explicitly.

- csvGUM-Style Uncertainty Budget — Sources Combined in Quadrature (.csv)A five-source uncertainty budget laid out the way the GUM prescribes: each source with its distribution, its divisor, its sensitivity coefficient and its contribution, then the combined and expanded values. Rectangular sources are divided by the square root of three, which is the step budget spreadsheets most often get wrong.

- csvInterlaboratory Comparison — z-Scores and En Numbers (.csv)Six fictional laboratories reporting the same measurand, scored both by z-score against a fixed sigma and by En number against each lab's own claimed uncertainty. The two statistics disagree about which labs are acceptable, which is the point: En rewards an honest uncertainty claim and z does not.

- csvSI Unit Symbols in UTF-8 — Look-Alike Codepoints (.csv)Eight measurements whose unit symbols use the codepoints that have Unicode look-alikes: MICRO SIGN against GREEK MU, OHM SIGN against GREEK OMEGA, ANGSTROM SIGN against A-with-ring. Each row also carries an ASCII fallback, so a normalisation bug shows up as a column mismatch rather than as an invisible change.

- csvSignificant Figures Lost to Float Parsing (.csv)Eight written measurements where the trailing zeros carry the precision of the measurement, alongside what a float parse leaves behind. Parsing 1.200 to the double 1.2 is not a rounding error, it is the loss of the claim that the value is known to four figures.

- csvTitration Replicates — Mean, SD, SEM and RSD (.csv)Four batches of five replicate titrations with the mean, sample standard deviation, standard error and relative standard deviation computed for each. The standard deviation uses the n-1 denominator, which is stated explicitly because a population-denominator implementation disagrees on every row.

Generated by generation/scientific.py. Free for any use, no attribution required — license.