// retoor <retoor@molodetz.nl>
import "yaml" for Yaml
var simple = {"name": "test", "value": 42}
var str = Yaml.stringify(simple)
System.print(str.contains("name: test")) // expect: true
System.print(str.contains("value: 42")) // expect: true
var withList = {"items": ["one", "two", "three"]}
var listStr = Yaml.stringify(withList)
System.print(listStr.contains("items:")) // expect: true
System.print(listStr.contains("- one")) // expect: true
System.print(listStr.contains("- two")) // expect: true
var nested = {"server": {"host": "localhost", "port": 8080}}
var nestedStr = Yaml.stringify(nested)
System.print(nestedStr.contains("server:")) // expect: true
System.print(nestedStr.contains("host: localhost")) // expect: true
System.print(Yaml.stringify(null)) // expect: null
System.print(Yaml.stringify(true)) // expect: true
System.print(Yaml.stringify(false)) // expect: false
System.print(Yaml.stringify(42)) // expect: 42
System.print(Yaml.stringify("hello")) // expect: hello