Swiftriver\Core\Workflows\PreProcessingSteps\PreProcessingStepsBase::ParseJsonToPreProcessingStepName PHP Method

ParseJsonToPreProcessingStepName() public method

    public function ParseJsonToPreProcessingStepName($json)
    {
        $result = json_decode($json);
        if (!$result || $result == null) {
            throw new \InvalidArgumentException("The json was malformed");
        }
        if (!isset($result->name) || !is_string($result->name)) {
            throw new \InvalidArgumentException("The JSON did not contain the required 'name' string");
        }
        return $result->name;
    }