Class ProductJsonSerializer

Class ProductJsonSerializer

This class will serialize and deserialize a Product entity. It can be used into many places where PHP interacts with external requests such as AJAX or API communication.

AbstractJsonSerializer implements SerializerInterface
ProductJsonSerializer

Methods summary

public serialize( ProductInterface $object, boolean $encode = true ) : string|array

Serialize a Product object to a JSON string.

public deserialize( string $string, object $baseObject = null ) : ProductInterface

Deserialize a Product JSON String.

protected _serializeImages( ProductImageContainerInterface $imageContainer ) : array

Serialize Images

protected _deserializeImages( $json ) : ProductImageContainer

Deserialize Images

protected _serializeSettings( ProductSettingsInterface $settings ) : array

Serialize Settings

protected _deserializeSettings( ProductSettingsInterface $settings, $json ) : ProductSettingsInterface

Deserialize Settings

Methods inherited from AbstractJsonSerializer

__construct(), _deserializeAddonValues(), _deserializeLanguageSpecificProperty(), _serializeAddonValues(), _serializeLanguageSpecificProperty(), jsonEncode()

Properties summary

Properties inherited from AbstractJsonSerializer

$languageProvider