Skip to content

Commit e946b31

Browse files
committed
Rewords
1 parent b225879 commit e946b31

File tree

2 files changed

+154
-168
lines changed

2 files changed

+154
-168
lines changed

serializer.rst

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -629,37 +629,34 @@ all the properties of the class::
629629
// ...
630630
}
631631

632-
Serializing JSON using streams
632+
Serializing JSON Using Streams
633633
------------------------------
634634

635-
Symfony is able of encoding PHP data structures to JSON streams and decoding
636-
JSON streams back into PHP data structures.
635+
Symfony can encode PHP data structures to JSON streams and decode JSON streams
636+
back into PHP data structures.
637637

638-
To do so, it relies on the JsonStreamer component, which is designed for high
639-
efficiency and can process large JSON data incrementally without needing to
640-
load the entire content into memory.
638+
To do this, it relies on the :doc:`JsonStreamer component </serializer/streaming_json>`,
639+
which is designed for high efficiency and can process large JSON data incrementally,
640+
without needing to load the entire content into memory.
641641

642-
When deciding between the :doc:`Serializer component <serializer>` and the
643-
JsonStreamer component, consider the following:
642+
When deciding between the Serializer component and the JsonStreamer component,
643+
consider the following:
644644

645-
- **Serializer Component**: Ideal for scenarios requiring flexibility, such as
646-
dynamically manipulating object shapes using normalizers and denormalizers,
647-
or handling complex objects which multiple serialization representation.
648-
Plus, it allows working with formats beyond JSON (and even with a custom
649-
format of yours).
645+
* **Serializer Component**: Best suited for use cases that require flexibility,
646+
such as dynamically manipulating object structures using normalizers and
647+
denormalizers, or handling complex objects with multiple serialization
648+
formats. It also supports output formats beyond JSON (including your own
649+
custom ones).
650+
* **JsonStreamer Component**: Best suited for simple objects and scenarios that
651+
demand high performance and low memory usage. It's particularly effective
652+
for processing very large JSON datasets or when streaming JSON in real-time
653+
without loading the entire dataset into memory.
650654

651-
- **JsonStreamer Component**: Ideal for simple objects and tasks that
652-
demand high performance and minimal memory usage. It's particularly
653-
effective when processing very large JSON datasets or in scenarios that
654-
require streaming JSON in real-time without loading the entire dataset
655-
into memory.
655+
The choice depends on your specific use case. The JsonStreamer component is
656+
tailored for performance and memory efficiency, whereas the Serializer
657+
component provides greater flexibility and broader format support.
656658

657-
Choosing between the two depends on your specific use case requirements.
658-
The JsonStreamer component is tailored to optimize for performance and memory
659-
efficiency, while the Serializer component offers flexibility and broader
660-
format support.
661-
662-
Read more about streaming JSON in :doc:`/serializer/streaming_json`.
659+
Read more about :doc:`streaming JSON </serializer/streaming_json>`.
663660

664661
Serializing to or from PHP Arrays
665662
---------------------------------

0 commit comments

Comments
 (0)