1. Go to this page and download the library: Download ksmz/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/ */
ksmz / json example snippets
use ksmz\json\Json;
Json::encode(['foo' => 'bar']);
try {
Json::encode(...);
} catch (RecursionException $exception) {
// Specific exception
} catch (JsonException $exception) {
// All possible exceptions
}