Skip to content

[Serializer] SerializedName based on groups #30483

@davidschmidt

Description

@davidschmidt

Description
It would be helpful to be able to change the serialized name based on the serialization group.

Example

class Person
{
    /**
     * @SerializedName(name="address1", groups={"registration"})
     * @SerializedName(name="address2", groups={"update"})
     * @Groups({"registration", "update", "view"})
     * @var string
     */
    public $address;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions