NimYAML/doc/snippets/quickstart/07/00-code.nim

10 lines
179 B
Nim
Raw Normal View History

import yaml.serialization, streams
2016-10-08 16:38:27 +00:00
type Person = object
name : string
age : int32
var personList: seq[Person]
var s = newFileStream("in.yaml")
load(s, personList)
s.close()