'Create new MapreduceSpec from the json, encoded by to_json.
Args:
json: json representation of MapreduceSpec.
Returns:
an instance of MapreduceSpec with all data deserialized from json.'

@classmethod
def from_json(cls, json):

    mapreduce_spec = cls(json['name'], json['mapreduce_id'], json['mapper_spec'], json.get('params'))
    return mapreduce_spec
