write footers in serialiser
defer writing header in serialiser
change API of parser and serialiser to not overload stream options object
add documentation