YAML is just a data format. Make your own "thing" that takes input in any format you desire, then dump it to YAML. (also, YAML is dynamically typed, and supports explicit typing, but the parser can choose to ignore it)