@param IOInterface $io
@param JsonLint    $jsonLint

@return JsonLint
429102
public static function configure(IOInterface $io, JsonLint $jsonLint)
    {
        if (true === $jsonLint->isUndefined()) {
            $answer = $io->ask(HookQuestions::JSONLINT_TOOL, HookQuestions::DEFAULT_TOOL_ANSWER);
            $jsonLint = $jsonLint->setEnabled(new Enabled(HookQuestions::DEFAULT_TOOL_ANSWER === strtoupper($answer)));
        }

        return $jsonLint;
    }
853717
public static function invoke($jsonString, $returnNode = false)
    {
        $dom = new \DOMDocument('1.0', 'UTF-8');

        $jsonString = mb_convert_encoding($jsonString, 'UTF-8', mb_detect_encoding($jsonString));

        $jsonDecode = json_decode($jsonString, false);
        $lastError = json_last_error();

        if (JSON_ERROR_NONE === $lastError)
        {
            $ul = $dom->createElement('ul');
            $ul->setAttribute('class', 'json-list');
            $dom->appendChild($ul);

            if ($jsonDecode instanceof \stdClass)
                self::objectOutput($jsonDecode, $dom, $ul);
            else if (is_array($jsonDecode))
                self::arrayOutput($jsonDecode, $dom, $ul);

            if ($returnNode)
                return $dom;

            return static::saveHTMLExact($dom, $ul);
        }

        throw new \DomainException(sprintf(
            'Could not convert input to HTML: "%s"',
            JsonErrorHelper::invoke(true, $lastError)
        ));
    }
997720
private static function write(IOInterface $io, string $message)
    {
        $msg = [
            '[Panthor]: ' . $message,
        ];

        $io->write($msg);
    }
665589
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $restUrl = $input->getArgument('rest-url');

        /** @var TenantInterface $tenant */
        if ($input->getOption('tenant-id')) {
            $tenant = $this->em->getRepository($this->tenantClass)->find($input->getOption('tenant-id'));
        } elseif ($input->getOption('client-key')) {
            /** @noinspection PhpUndefinedMethodInspection */
            $tenant = $this->em->getRepository($this->tenantClass)->findOneByClientKey($input->getOption('client-key'));
        } else {
            throw new \RuntimeException('Please provide client-key or tenant-id');
        }

        $request = new AtlassianRestClient($tenant);
        $json = $request->get($restUrl);

        $output->writeln('');
        echo \json_encode($json, \JSON_PRETTY_PRINT);
        $output->writeln('');
    }
980
protected function createShell($className, ConsoleIo $io)
    {
        $shell = $this->factory->create($className);
        if ($shell instanceof Shell) {
            $shell->setIo($io);
        }

        return $shell;
    }
916505
private function getDeserializedContent($jsonContent)
    {
        $serializer = $this->getSerializer();

        $data = trim($jsonContent);
        if (substr($data, 0, 1) === '[') { // Check if the current content is an array
            $deserializationType = 'array<'.SerializableInterface::class.'>';
            $array = $serializer->deserialize($data, $deserializationType, 'json');
            $content = new SerializableArray($array);
        } else {
            $content = $serializer->deserialize($data, SerializableInterface::class, 'json');
        }

        return $content;
    }
668902
@Deprecated
    public static <T> T jsonTo( String json, TypeReference<T> typeRef ) {
        return util.stringToType( json, typeRef );
    }
786829
public function determineCompletedLanguages(JsonDocument $jsonDocument)
    {
        $jsonDocument = $this->polyFillMultilingualFields($jsonDocument);
        return parent::determineCompletedLanguages($jsonDocument);
    }
336025
public static void run(final RunType runInto, final JRebirthRunnable runnable, final long... timeout) {
        switch (runInto) {
            case JAT:
                runIntoJAT(runnable);
                break;
            case JAT_SYNC:
                runIntoJATSync(runnable, timeout);
                break;
            case JIT:
                runIntoJIT(runnable);
                break;
            case JIT_SYNC:
                runIntoJITSync(runnable, timeout);
                break;
            case JTP:
                runIntoJTP(runnable);
                break;
            case JTP_SYNC:
                runIntoJTPSync(runnable, timeout);
                break;
            case SAME:
            default:
                runnable.run();
        }
    }
665783
@SuppressWarnings("WeakerAccess")
    protected JsonGenerator createJsonGenerator(OutputStream destination) throws IOException {
        return new SentryJsonGenerator(jsonFactory.createGenerator(destination));
    }
303254
public function saveJsonString($property, $jsonString)
    {
        $this->jsonManager()->isJsonProperty($property, true);

        $this->{$property} = $jsonString;
    }
742587
function lintJson(content) {
	try {
		jsonlint.parse(content);
	} catch (lintError) {
		if (typeof lintError.message === 'string') {
			lintError.message = lintError.message.replace(/\t/g, ' ');
		}

		throw lintError;
	}
}
201607
final public static function DaftJsonFromJsonType(
        string $jsonType,
        array $propVal,
        bool $writeAll
    ) {
        return JsonTypeUtilities::ArrayToJsonType($jsonType, $propVal, $writeAll);
    }
113114
public function handle(Args $args, IO $io)
    {
        $criteria = array();

        if ($args->isOptionSet('path')) {
            $criteria['path'] = $args->getOption('path');
            $criteria['language'] = $args->getOption('language');
        }

        if ($args->isOptionSet('name')) {
            if (isset($criteria['path'])) {
                throw new RuntimeException('The options --name and --path cannot be combined.');
            }

            $criteria['path'] = '/**/'.$args->getOption('name');
            $criteria['language'] = $args->getOption('language');
        }

        if ($args->isOptionSet('class')) {
            $criteria['class'] = $args->getOption('class');
        }

        if ($args->isOptionSet('type')) {
            $criteria['bindingType'] = $args->getOption('type');
        }

        if (empty($criteria)) {
            throw new RuntimeException('No search criteria specified.');
        }

        return $this->listMatches($io, $criteria);
    }
942337
public function render(IO $io, $indentation = 0)
    {
        $layout = new BlockLayout();

        $this->renderHelp($layout);

        $layout->render($io, $indentation);
    }
1307717
public static <T> T withJsonFile(File jsonFile,
            TypeReference<T> typeReference) {
        try {
            return jsonMapper.readValue(jsonFile, typeReference);
        } catch (Exception e) {
            return JMExceptionManager.handleExceptionAndReturnNull(log, e,
                    "withJsonFile", jsonFile);
        }
    }
41758
public static function configure(IOInterface $io, PhpUnit $phpUnit)
    {
        /** @var PhpUnit $phpUnit */
        if (true === $phpUnit->isUndefined()) {
            $answer = $io->ask(HookQuestions::PHPUNIT_TOOL, HookQuestions::DEFAULT_TOOL_ANSWER);

            $phpUnit = $phpUnit->setEnabled(new Enabled(HookQuestions::DEFAULT_TOOL_ANSWER === strtoupper($answer)));

            if (true === $phpUnit->isEnabled()) {
                $randomAnswer = $io->ask(HookQuestions::PHPUNIT_RANDOM_MODE, HookQuestions::DEFAULT_TOOL_ANSWER);
                $optionsAnswer = $io->ask(HookQuestions::PHPUNIT_OPTIONS, null);

                $randomMode = new PhpUnitRandomMode(HookQuestions::DEFAULT_TOOL_ANSWER === strtoupper($randomAnswer));
                $options = new PhpUnitOptions($optionsAnswer);

                $phpUnit = $phpUnit->setRandomModeAndOptions($randomMode, $options);
            }
        }

        return $phpUnit;
    }