Resolve generators as lists when json encoding