মূল বিষয়বস্তুতে যান
CuteJSON
↑↓ নেভিগেট Enter নির্বাচন Esc বন্ধ

ব্যবহারকারী JSON Schema

মধ্যম JSON Schema

প্রয়োজনীয় ফিল্ড, প্যাটার্ন এবং enum সহ ব্যবহারকারী অবজেক্ট যাচাই করার জন্য একটি JSON Schema। কপি করার জন্য প্রস্তুত।

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/user.schema.json",
  "title": "User",
  "description": "A user account in the system.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^usr_[a-z0-9]{6}$",
      "description": "Unique user identifier"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "age": {
      "type": "integer",
      "minimum": 0,
      "maximum": 150
    },
    "role": {
      "type": "string",
      "enum": ["admin", "editor", "viewer"]
    }
  },
  "required": ["id", "name", "email"],
  "additionalProperties": false
}
JSON উদাহরণ