Skip to content

Purely yes/no question: does this support dynmically added attributes on objects? #804

@raveren

Description

@raveren

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
            };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions