Add output serialization.
0.3.0