'Construct a spec from JSON.
Parameters:
stream -- string or file object to read from.'

@staticmethod
def from_json(stream):

    try:
        data = sjson.load(stream)
        return Spec.from_dict(data)
    except Exception as e:
        raise sjson.SpackJSONError('error    parsing    JSON    spec:', str(e))
