Array: Difference between revisions

From Wikisphere
Jump to navigation Jump to search
Created page with "{ "$id": "https://example.com/arrays.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "description": "A representation of a person, company, organization, or place", "type": "object", "properties": { "fruits": { "type": "array", "items": { "type": "string" } }, "vegetables": { "type": "array", "items": { "$ref": "#/definitions/veggie" } } }, "definitions": { "veggie":..."
 
Admin changed the content model of the page JsonSchema:Array from "wikitext" to "JSON"
 
Line 1: Line 1:
{
{
  "$id": "https://example.com/arrays.schema.json",
"$id": "https://example.com/arrays.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A representation of a person, company, organization, or place",
"description": "A representation of a person, company, organization, or place",
  "type": "object",
"type": "object",
  "properties": {
"properties": {
    "fruits": {
"fruits": {
      "type": "array",
"type": "array",
      "items": {
"items": {
        "type": "string"
"type": "string"
      }
}
    },
},
    "vegetables": {
"vegetables": {
      "type": "array",
"type": "array",
      "items": {
"items": {
        "$ref": "#/definitions/veggie"
"$ref": "#/definitions/veggie"
      }
}
    }
}
  },
},
  "definitions": {
"definitions": {
    "veggie": {
"veggie": {
      "type": "object",
"type": "object",
      "required": [
"required": [
        "veggieName",
"veggieName",
        "veggieLike"
"veggieLike"
      ],
],
      "properties": {
"properties": {
        "veggieName": {
"veggieName": {
          "type": "string",
"type": "string",
          "description": "The name of the vegetable."
"description": "The name of the vegetable."
        },
},
        "veggieLike": {
"veggieLike": {
          "type": "boolean",
"type": "boolean",
          "description": "Do I like this vegetable?"
"description": "Do I like this vegetable?"
        }
}
      }
}
    }
}
  }
}
}
}

Latest revision as of 08:11, 4 November 2025

$id"https://example.com/arrays.schema.json"
$schema"http://json-schema.org/draft-07/schema#"
description"A representation of a person, company, organization, or place"
type"object"
properties
fruits
type"array"
items
type"string"
vegetables
type"array"
items
$ref"#/definitions/veggie"
definitions
veggie
type"object"
required
"veggieName"
"veggieLike"
properties
veggieName
type"string"
description"The name of the vegetable."
veggieLike
type"boolean"
description"Do I like this vegetable?"