my ($product_id, $category_tree);
try {
$product_id = from_json($ret->responseContent())->{data}->[0]->{id};
my ($product_id, $category_tree);
try {
$product_id = from_json($ret->responseContent())->{data}->[0]->{id};
} catch { die "Malformed JSON Data: $_ " . $ret->responseContent(); };
my $cat;
# if the part is connected to a category at all
} catch { die "Malformed JSON Data: $_ " . $ret->responseContent(); };
my $cat;
# if the part is connected to a category at all