/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Serialize/JsonConverter.php
28 строк
856 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2017 Adobe * All Rights Reserved. */ namespace Magento\Framework\Serialize; /** * This class was introducted only for usage in the \Magento\Framework\DataObject::toJson method. * It should not be used in other cases and instead \Magento\Framework\Serialize\Serializer\Json::serialize * should be used. */ class JsonConverter { /** * This method should only be used by \Magento\Framework\DataObject::toJson * All other cases should use \Magento\Framework\Serialize\Serializer\Json::serialize directly * * @param string|int|float|bool|array|null $data * @return bool|string * @throws \InvalidArgumentException */ public static function convert($data) { $serializer = new \Magento\Framework\Serialize\Serializer\Json(); return $serializer->serialize($data); } }