Closed janezd closed 1 year ago
Furthermore, trubar's schema is recursive. MsgDict = Dict[str, Union["MsgDict", str, bool, None]]
can be represented in strictyaml using the following hack,
yaml_schema = MapPattern(Str(), EmptyNone() | NullNone() | Bool() | Str() | Validator())
yaml_schema._value_validator._validator_b = yaml_schema
but we obviously don't want to do this.
Continued in #41.
Trubar uses a very limited subset of Yaml, so the parser should be as simple as possible, if this is beneficial in any way.
PyYAML's error messages are difficult to understand. I hope strictyaml's are better, because it understands a limited set of YAML.
It should also be safer, e.g., avoids the Norway problem etc.