Interface type serialization

Described in #23.