change signature of print() method
implement for yaml
extract test fixture; implements for json