Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit f8b5958

Browse files
Updated Serializer implementations (#8382)
Co-authored-by: Jeff Matthews <[email protected]>
1 parent eb588a6 commit f8b5958

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/guides/v2.3/extension-dev-guide/framework/serializer.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,22 @@ For security reasons, `SerializerInterface` implementations, such as the Json an
2626
### Json (default)
2727

2828
The [`Magento\Framework\Serialize\Serializer\Json`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/Json.php){:target="_blank"} class serializes and unserializes data using the [JSON](http://www.json.org/){:target="_blank"} format.
29-
This class does not unserialize objects.
29+
30+
### JsonHexTag
31+
32+
The [`Magento\Framework\Serialize\Serializer\JsonHexTag`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/JsonHexTag.php){:target="_blank"} class serializes and unserializes data using the [JSON](http://www.json.org/){:target="_blank"} format using the `JSON_HEX_TAG` option enabled.
33+
34+
### Base64Json
35+
36+
The [`Magento\Framework\Serialize\Serializer\Base64Json`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/Base64Json.php){:target="_blank"} class serializes and encodes in the base64 format, and decodes the base64 encoded string and unserializes data using the [JSON](http://www.json.org/){:target="_blank"} format.
3037

3138
### Serialize
3239

3340
The [`Magento\Framework\Serialize\Serializer\Serialize`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/Serialize.php){:target="_blank"} class is less secure than the Json implementation but provides better performance on large arrays.
34-
This class does not unserialize objects in [PHP](https://glossary.magento.com/php) 7.
41+
42+
### FormData
43+
44+
The [`Magento\Framework\Serialize\Serializer\FormData`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Serialize/Serializer/FormData.php){:target="_blank"} class unserializes the form data using the [JSON](http://www.json.org/){:target="_blank"} format. This class does not serialize objects to a form data format.
3545

3646
{:.bs-callout-warning}
3747
Magento discourages using the Serialize implementation directly because it can lead to security vulnerabilities. Always use the `SerializerInterface` for serializing and unserializing.
@@ -129,4 +139,4 @@ Here is an example:
129139
}
130140
...
131141

132-
```
142+
```

0 commit comments

Comments
 (0)