diff --git a/components/serializer.rst b/components/serializer.rst index 8f014238475..a1a6d6ed260 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -344,6 +344,8 @@ method on the normalizer definition:: $serializer = new Serializer(array($normalizer), array($encoder)); $serializer->serialize($person, 'json'); // Output: {"name":"foo","sportsman":false} +.. _component-serializer-converting-property-names-when-serializing-and-deserializing: + Converting Property Names when Serializing and Deserializing ------------------------------------------------------------ diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 8e7a6416333..f3a5deacf3d 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -104,6 +104,7 @@ Configuration * :ref:`enabled ` * :ref:`cache ` * :ref:`enable_annotations ` + * `name_converter`_ secret ~~~~~~ @@ -1505,6 +1506,24 @@ If this option is enabled, serialization groups can be defined using annotations For more information, see :ref:`cookbook-serializer-using-serialization-groups-annotations`. +name_converter +.............. + +.. versionadded:: 2.8 + The ``name_converter`` setting was introduced in Symfony 2.8. + +**type**: ``string`` + +The name converter to use. +The :class:`Symfony\\Component\\Serializer\\NameConverter\\CamelCaseToSnakeCaseNameConverter` +name converter can enabled by using the ``serializer.name_converter.camel_case_to_snake_case`` +value. + +.. seealso:: + + For more information, see + :ref:`component-serializer-converting-property-names-when-serializing-and-deserializing`. + Full Default Configuration --------------------------