'Serializes all data in this mapreduce spec into json form.
Returns:
data in json format.'

def to_json(self):

    mapper_spec = self.mapper.to_json()
    return {'name': self.name, 'mapreduce_id': self.mapreduce_id, 'mapper_spec': mapper_spec, 'params': self.params}
