Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

Product JSON Schema

Intermediate JSON Schema

A JSON Schema for validating product objects with nested price and array fields. A realistic fixture for your own project or test suite.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Product",
  "type": "object",
  "properties": {
    "id": { "type": "string" },
    "name": { "type": "string", "minLength": 1 },
    "price": {
      "type": "object",
      "properties": {
        "amount": { "type": "number", "minimum": 0 },
        "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }
      },
      "required": ["amount", "currency"]
    },
    "tags": {
      "type": "array",
      "items": { "type": "string" },
      "uniqueItems": true
    },
    "inStock": { "type": "boolean" }
  },
  "required": ["id", "name", "price"]
}
JSON Examples