{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/unist/latest.json",
  "title": "JSON schema for unist syntax trees",
  "description": "Syntactic units in unist syntax trees are called nodes, and implement the Node interface.",
  "x-lintel": {
    "source": "https://www.schemastore.org/unist.json",
    "sourceSha256": "07c21f4f69fc578026d5ea833bd953f99034b9702674ea156d10ebb821237f9a"
  },
  "type": "object",
  "properties": {
    "type": {
      "description": "The type field is a non-empty string representing the variant of a node. This field can be used to determine the type a node implements.",
      "markdownDescription": "The [type](https://github.com/syntax-tree/unist#type) field is a non-empty string representing the variant of a node. This field can be used to determine the type a node implements.",
      "type": "string"
    },
    "position": {
      "$ref": "#/$defs/Position"
    },
    "children": {
      "description": "The children field is a list representing the children of a node.",
      "type": "array",
      "items": {
        "$ref": "#"
      }
    },
    "data": {
      "description": "The data field represents information from the ecosystem. The value of the data field implements the Data interface.",
      "markdownDescription": "The data field represents information from the ecosystem. The value of the data field implements the [Data](https://github.com/syntax-tree/unist#data) interface.",
      "type": "object",
      "additionalProperties": true
    },
    "value": {
      "description": "The value field can contain any value."
    }
  },
  "required": [
    "type"
  ],
  "additionalProperties": true,
  "$defs": {
    "Point": {
      "description": "A point represents one place in a source file. The value of the point field implements the Point interface.",
      "markdownDescription": "A point represents one place in a source file. The value of the point field implements the [Point](https://github.com/syntax-tree/unist#point) interface.",
      "type": "object",
      "properties": {
        "column": {
          "description": "The column field (1-indexed integer) represents a column in a source file.",
          "type": "integer",
          "minimum": 1
        },
        "line": {
          "description": "The line field (1-indexed integer) represents a line in a source file.",
          "type": "integer",
          "minimum": 1
        },
        "offset": {
          "description": "The offset field (0-indexed integer) represents a character in a source file.",
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "column",
        "line"
      ],
      "additionalProperties": false
    },
    "Position": {
      "description": "A position represents the location of a node in a source file. The value of the position field implements the Position interface. The position field must not be present if a node is generated.",
      "markdownDescription": "A position represents the location of a node in a source file. The value of the position field implements the [Position](https://github.com/syntax-tree/unist#position) interface. The position field must not be present if a node is generated.",
      "type": "object",
      "properties": {
        "end": {
          "$ref": "#/$defs/Point",
          "description": "The end field of Position represents the place of the first character after the parsed source region, whether it exists or not."
        },
        "start": {
          "$ref": "#/$defs/Point",
          "description": "The start field of Position represents the place of the first character of the parsed source region."
        }
      },
      "required": [
        "end",
        "start"
      ],
      "additionalProperties": false
    }
  }
}
