Table of Contents

Class Parser

Namespace
DeltaPack
Assembly
DeltaPack.dll

Parses YAML schema definitions into DeltaPack schema types.

public static class Parser
Inheritance
Parser
Inherited Members

Methods

ParseSchemaYml(string)

Parses a YAML schema string into a dictionary of schema types.

public static IReadOnlyDictionary<string, SchemaType> ParseSchemaYml(string yamlContent)

Parameters

yamlContent string

The YAML schema content.

Returns

IReadOnlyDictionary<string, SchemaType>

A dictionary mapping type names to their schema definitions.

Examples

string yaml = @"
Player:
  name: string
  score: int
";
var schema = Parser.ParseSchemaYml(yaml);
var api = Interpreter.Load<object?>(schema, "Player");