Change interface of Schema.serialize to take a single object.