public function importString($content, $isMandatory = true)
    {
        if(empty($content) && $isMandatory)
        {
            throw new JsonException("Json content mandatory but none found.");
        }

        $this->params = array();
        if (!empty($content))
        {
            $this->params = @json_decode($content, true);

            if (json_last_error() !== JSON_ERROR_NONE) {
                throw new JsonException("Error parsing json content: '$content'. Error: " . json_last_error_msg());
            }

            if(null === $this->params)
            {
                // @codeCoverageIgnoreStart
                throw new JsonException("Error parsing json content: '$content'");
                // @codeCoverageIgnoreEnd
            }
        }
        return $this->params;
    }