You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/serialization.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -516,13 +516,13 @@ This will add the serialization group `can_retrieve_book` only if the currently
516
516
instance.
517
517
518
518
Note: In this example, we use the `TokenStorageInterface` to verify access to the book instance. However, Symfony
519
-
provides many useful other services that might be better suited to your use case (for example, the [`AuthorizationChecker`](https://symfony.com/doc/current/components/security/authorization.html#authorization-checker)).
519
+
provides many useful other services that might be better suited to your use case. For example, the [`AuthorizationChecker`](https://symfony.com/doc/current/components/security/authorization.html#authorization-checker).
520
520
521
521
## Name Conversion
522
522
523
523
The Serializer Component provides a handy way to map PHP field names to serialized names. See the related [Symfony documentation](http://symfony.com/doc/master/components/serializer.html#converting-property-names-when-serializing-and-deserializing).
524
524
525
-
To use this feature, declare a new service with the id `app.name_converter`. For example, you can convert `CamelCase` to
525
+
To use this feature, declare a new name converter service. For example, you can convert `CamelCase` to
If symfony's `MetadataAwareNameConverter` is available it'll be used by default. If you specify one in ApiPlatform configuration, it'll be used. Note that you can use decoration to benefit from this name converter in your own implementation.
541
+
540
542
## Decorating a Serializer and Adding Extra Data
541
543
542
-
In the following example, we will see how we can add extra information to the serialized output. Here is how we can add the
544
+
In the following example, we will see how we add extra informations to the serialized output. Here is how we add the
0 commit comments