ComplexEncoder sounds like you want to encode complex numbers. Here its just a set / list conversion, so I would rename it to SetEncoder maybe