Sanpi\Behatch\Json\Json::decode PHP Method

decode() private method

private decode ( $content )
    private function decode($content)
    {
        $result = json_decode($content);
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \Exception("The string '{$content}' is not valid json");
        }
        return $result;
    }