1. Go to this page and download the library: Download tcds-io/php-jackson 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/ */
tcds-io / php-jackson example snippets
use Tcds\Io\Jackson\JsonObjectMapper;
$mapper = new JsonObjectMapper();
$address = $mapper->readValue(Address::class, $json);
use Tcds\Io\Jackson\ArrayObjectMapper;
$mapper = new ArrayObjectMapper();
$address = $mapper->readValue(Address::class, $dataArray);
use Tcds\Io\Jackson\Node\JsonProperty;
readonly class User
{
public function __construct(
#[JsonProperty('first_name')] public string $firstName,
#[JsonProperty('last_name')] public string $lastName,
public int $age,
) {}
}
use Tcds\Io\Jackson\Node\JsonMapper;
#[JsonMapper(reader: MoneyReader::class, writer: MoneyWriter::class)]
readonly class Money
{
public function __construct(public int $cents) {}
}
[
'datetime' => '2025-10-22T11:21:31+00:00'
]
$e->trace; // ['address','place','position']
$e->expected; // expected type description
$e->given; // actual given value
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.