Product JSON Schema (draft-07)
A JSON Schema (draft-07) describing a product object, with required fields, types, and constraints — paired with a conforming and a deliberately non-conforming instance for testing validators.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Product",
"type": "object",
"required": [
"product_id",
"name",
"price",
"in_stock"
],
"properties": {
"product_id": {
"type": "integer",
"minimum": 1
},
"name": {
"type": "string",
"minLength": 1
},
"price": {
"type": "number",
"exclusiveMinimum": 0
},
"in_stock": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
Specifications
- Spec
- JSON Schema draft-07
- Required
- product_id, name, price, in_stock
- Additional Properties
- false
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
- csv10,000-Row CSVA CSV with 10,000 data rows — for testing streaming parsers, memory handling, and import performance.
- csvClean CSVA clean, well-formed CSV with a header and 20 rows — the baseline case for CSV parser testing.
- csvE-commerce Customers (CSV, 500 rows)A realistic e-commerce customer directory (500 rows) — part of a relational dataset (products, customers, orders) with CSV, JSON, SQL, and Parquet twins for testing joins, imports, and conversion.
- jsonE-commerce Customers (JSON, 500 records)The e-commerce customers table as a JSON array — the format twin of the CSV, for import and conversion testing.
- sqlE-commerce Database Schema (SQL)A relational SQL schema (products, customers, orders with primary and foreign keys) plus sample INSERTs — the DDL twin of the e-commerce dataset, for testing schema import and migrations.
- csvE-commerce Orders (CSV, 2000 rows)A realistic e-commerce order lines (customer_id → customers, product_id → products) (2000 rows) — part of a relational dataset (products, customers, orders) with CSV, JSON, SQL, and Parquet twins for testing joins, imports, and conversion.
Generated by generation/data_realworld.py. Free for any use, no attribution required — license.