I'm wondering if the type conversion should be in the ApiListener, as non-"public" APIs could benefit for this as well, and it's pretty generic after all.

Think this listener should do as little as possible, e.g. only shuffle keys