Core features of fkYAML
developfkYAML provides comprehensive YAML 1.2.2 compliance and several developer-friendly features:
YAML Compliance
- Syntax Support: Handles scalars, sequences, and mappings in both block and flow styles. Supports sequences and mappings as keys for
operator[]orat(). - Directives: Supports
%TAGand%YAMLdirectives (unknown directives are ignored). - Advanced YAML: Supports tags, anchors, and aliases.
- Document Handling: Supports single document processing via
deserialize()/serialize()and multiple document processing viadeserialize_docs()/serialize_docs().
Encodings and Line Breaks
- Encodings: Supports UTF-8, UTF-16, and UTF-32 (including little and big endian). It features automatic detection of encodings via BOM or ASCII.
- Line Breaks: Supports both Unix (
\n) and Windows (\r\n) line breaks for deserialization. Serialization defaults to Unix style (\n).
Customization
- Node Value Types: The storage types for scalars, sequences, and mappings in
fkyaml::nodeare customizable via template parameters infkyaml::basic_node. - Type Conversion: Provides built-in conversions for STL containers and scalars. Users can implement custom
from_nodeandto_nodefunctions for project-specific types.