def to_json(self):
    """Serializes this MapperSpec into a json-izable object."""
    return {
        "mapper_handler_spec": self.handler_spec,
        "mapper_input_reader": self.input_reader_spec,
        "mapper_params": self.params,
        "mapper_shard_count": self.shard_count,
    }
Serializes this MapperSpec into a json-izable object.
mapreduce/model.py