1. Go to this page and download the library: Download aternos/almost-json library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$parser = new \Aternos\AlmostJson\AlmostJsonParser();
$input = new \Aternos\AlmostJson\Input('{key: "value"}', encoding: "ISO-8859-1");
$parsed = $parser->parse($input, assoc: true);
$parser = new \Aternos\AlmostJson\AlmostJsonParser();
$parser->setMaxDepth(512) // Maximum depth of the JSON tree
->setZeroPrefixOctal(true) // Parse numbers with leading zero as octal
->setTopLevelUnquotedStringAllowed(true); // Allow the root of the JSON tree to be an unquoted string