How to fix «Trying to get property 'd' of non-object» in the Sovos «Sales Tax» module?

Locate the method \Sovos\TaxCalculation\Model\Attribute\Source\ItemCategory::sendRequestToTaxify().

Replace the line:

$result = json_decode($json_response)->d->Codes;

with the code:

$j = json_decode($json_response);
if (is_string($j)) {
	$j = json_decode($j);
}
$result = $j->d->Codes;