Class AbstractJsonSerializer

Abstract Json Serializer

Serializers that extend this class should parse and encode entities so that they can be used in the shop's APIs.

Serialization must follow the "null" approach in order to enhance response clarity. That means that serializers must provide a null value than an empty string or an omitted node.

AbstractJsonSerializer implements SerializerInterface
Abstract
Package: Extensions\Serializers
Category: System
Located at Extensions/Serializers/AbstractJsonSerializer.inc.php

Methods summary

public __construct( void )

AbstractJsonSerializer Constructor

abstract public serialize( $object, $encode = true )
abstract public deserialize( $string, $baseObject = null )
public jsonEncode( array $data ) : string

JSON Encode Wrapper

protected _serializeAddonValues( KeyValueCollection $addonValues ) : array

Serialize Addon Values

protected _deserializeAddonValues( $json ) : array

Deserialize Addon Values

protected _serializeLanguageSpecificProperty( mixed $object, string $property ) : array

Serialize Language Specific Property

protected _deserializeLanguageSpecificProperty( mixed $object, stdobject $json, string $property, $type = 'StringType' )

Deserialize Language Specific Property

Properties summary

protected $languageProvider : LanguageProviderInterface

Used for the resources that require multiple languages.