mirror of
https://github.com/alrayyes/wiki.git
synced 2024-12-01 15:26:23 +00:00
511 B
511 B
id | title |
---|---|
b4612276-2244-4ad6-b3cd-f7e59a2da999 | @SerializedName |
Introduction
From Symfony 4.2, it's possible to configure name conversion rules using metadata.
Syntax
namespace App\Entity;
use Symfony\Component\Serializer\Annotation\SerializedName;
class Person
{
/** @SerializedName("customer_name") */
private $firstName;
public function __construct(string $firstName)
{
$this->firstName = $firstName;
}
// ...
}