Felix Krause 0f2e077b87 Added automatic test for quickstart snippets
* There are errors which indicate real bugs!
2016-10-08 23:35:33 +02:00

12 lines
297 B
Nim

import yaml.serialization, streams
type Person = object
name : string
age : int32
var personList = newSeq[Person]()
personList.add(Person(name: "Karl Koch", age: 23))
personList.add(Person(name: "Peter Pan", age: 12))
var s = newFileStream("out.yaml", fmWrite)
dump(personList, s)
s.close()