Product Instance — Invalid (JSON)
A product object that deliberately violates the product JSON Schema in five ways (out-of-range id, empty name, non-positive price, wrong boolean type, an extra property) — the negative case for testing validator error reporting.
{
"product_id": 0,
"name": "",
"price": -5,
"in_stock": "yes",
"colour": "red"
}
Specifications
- Conforms To
- product.schema.json
- Valid
- false
- Violations
- product_id<1, empty name, price<=0, in_stock not boolean, extra property
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.
Related files
- jsonIntentionally Invalid JSONAn intentionally invalid JSON file with a trailing comma and a missing closing brace — for testing parser error handling and messages. Not valid JSON by design.
- jsonJSON Schema (User)A draft-07 JSON Schema describing a user object — for testing schema validators and schema-aware tooling.
- csvMessy CSV (quoted commas, newlines, ragged rows)A deliberately messy CSV: a quoted field with a comma, a quoted field with an embedded newline, escaped double-quotes, and ragged rows with too few and too many fields — the cases that break naïve parsers.
- epubEPUB — Intentionally Invalid (bad OCF mimetype)An intentionally invalid EPUB: identical to the valid twin except its OCF mimetype entry is compressed and mislabelled as application/zip — a real EPUB spec violation. For testing how readers and validators handle a malformed container. Clearly labelled; harmless content.
- jpgIntentionally Corrupt — Truncated JPEGAn intentionally corrupt JPEG, truncated to half its bytes, for testing how a decoder handles incomplete image data. This is not a valid image by design.
- pdfIntentionally Corrupt — Truncated PDFAn intentionally corrupt PDF, truncated to 60% of its bytes, for testing how a PDF parser handles a damaged file. Not a valid document by design.
Generated by generation/data_realworld.py. Free for any use, no attribution required — license.