L4YAML

4.3. Preset Configurations🔗

Four preset configurations are provided for common use cases:

  • strict — all protections enabled at conservative thresholds. Recommended for processing untrusted input (e.g., user uploads, network-received configuration).

  • default — balanced settings suitable for most applications. Limits are generous enough for typical configuration files while still preventing resource exhaustion.

  • permissive — reduced validation for trusted input. Useful when parsing known-good YAML from controlled sources.

  • unlimited — all limits disabled. Explicitly dangerous; intended only for testing or for processing input that has already been validated externally.

The FFI layer exposes presets via presetToLimits, which maps a UInt8 preset code to the corresponding ParserLimits configuration.