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

ParseJsonToPreProcessingStepConfiguration() public method

    public function ParseJsonToPreProcessingStepConfiguration($json)
    {
        $array = json_decode($json, true);
        if (!$array || $array == null) {
            throw new \InvalidArgumentException("The json was malformed");
        }
        $return = array();
        $config = $array["data"];
        if ($config == null) {
            return $return;
        }
        foreach ($config as $key => $value) {
            $return[$key] = $value;
        }
        return $return;
    }