File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -865,7 +865,13 @@ The ``JsonEncoder``
865865~~~~~~~~~~~~~~~~~~~
866866
867867The ``JsonEncoder `` encodes to and decodes from JSON strings, based on the PHP
868- :phpfunction: `json_encode ` and :phpfunction: `json_decode ` functions.
868+ :phpfunction: `json_encode ` and :phpfunction: `json_decode ` functions. It can be
869+ useful to modify how these functions operate in certain instances by providing
870+ options such as ``JSON_PRESERVE_ZERO_FRACTION ``. You can use the serialization
871+ context to pass in these options using the key ``json_encode_options `` or
872+ ``json_decode_options `` respectively::
873+
874+ $this->serializer->serialize($data, 'json', ['json_encode_options' => \JSON_PRESERVE_ZERO_FRACTION]);
869875
870876The ``CsvEncoder ``
871877~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ processes asking for the same ``$version``::
207207 namespace App\Controller;
208208
209209 use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
210- use Symfony\Component\Lock\LockInterface ;
210+ use Symfony\Component\Lock\LockFactory ;
211211
212212 class PdfController extends AbstractController
213213 {
You can’t perform that action at this time.
0 commit comments