@classmethod
def from_json(cls, service_dict):
    """Create a service object from a JSON string."""
    service_endpoint, _type, _index, _attributes, sd = cls._parse_json(
        service_dict)
    return cls(service_endpoint, _type, _attributes, sd, _index)
