YamlDuplicateKeyHandling enum

What reading does with a mapping key that appears twice (M5c). Keys are compared as their consumer holds them: by decoded text in a YamlDocument, a node, an Object or a string-keyed dictionary; by the converted key in a typed dictionary; and by the member they match in a typed object. A repeated key that no member maps, or one inside a value that is skipped, is not judged.

Namespace: System.Text.Yaml ยท Assembly: Styml.dll

public enum YamlDuplicateKeyHandling

What reading does with a mapping key that appears twice (M5c). Keys are compared as their consumer holds them: by decoded text in a YamlDocument, a node, an Object or a string-keyed dictionary; by the converted key in a typed dictionary; and by the member they match in a typed object. A repeated key that no member maps, or one inside a value that is skipped, is not judged.

FieldsLink to this heading

Name Value Description
Error 0 A repeated key is an error, as YAML 1.2 requires. The default under the YAML grammar.
LastWins 1 The last occurrence wins: each occurrence is applied in order, as System.Text.Json and YamlDotNet do.
FirstWins 2 The first occurrence wins; a later one is read for syntax and skipped, as SharpYaml's FirstWins.

Generated from the XML documentation of the libraryBuilt with Douze

Esc to close