db.TypeSerializer: serialize