SchemaType

import { SchemaType } from "jsr:@ende/yaml";

type alias

type SchemaType = "failsafe" | "json" | "core" | "default" | "extended"

Name of the schema to use.

Note

It is recommended to use the schema that is most appropriate for your use case. Doing so will avoid any unnecessary processing and benefit performance.

Options include:

  • failsafe: supports generic mappings, generic sequences and generic strings.
  • json: extends failsafe schema by also supporting nulls, booleans, integers and floats.
  • core: functionally the same as json schema.
  • default: extends core schema by also supporting binary, omap, pairs and set types.
  • extended: extends default schema by also supporting regular expressions and undefined values.

See YAML 1.2 spec for more details on the failsafe, json and core schemas.

Source