symfony2: JMSSerializerBundle changes the attribute name from “className” to “class_name”
问题 I'm using the JMSSerializerBundle to serialize my entity. but I have the following problem: the attribute name is "className" but in my Json object I get a "class_name". this is my entity: /** * Events * * @ORM\Table() * @ORM\Entity */ class Events { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; ... /** * @var string * * @ORM\Column(name="className", type="string", length=255) */ private $className; /** * Set