Despite the best rounded feature set of similar libraries, I cannot find any approach that would allow me to handle deserialization of what's called "superfluous" class attributes in the docs of this class..? The docs say I have two options: throw exception and ignore.
But my usecase demands that I create dynamic columns (for classes with #[AllowDynamicProperties])
Btw, the best approach in this department is by netresearch/jsonmapper
$mapper->undefinedPropertyHandler = static function (object $object, string $propName, mixed $jsonValue) {
$object->{$propName} = $jsonValue; // this line is my custom code
};
Despite the best rounded feature set of similar libraries, I cannot find any approach that would allow me to handle deserialization of what's called "superfluous" class attributes in the docs of this class..? The docs say I have two options: throw exception and ignore.
But my usecase demands that I create dynamic columns (for classes with
#[AllowDynamicProperties])Btw, the best approach in this department is by
netresearch/jsonmapper