Get Serialize value in array format using Magento 2.

Get Serialize value into an array format by using an unserialize() method of native Magento interface.

unserialize() method is used for unserialize the data in Magento 2.

Use the Magento\Framework\Serialize\SerializerInterface interface to retrieve unserialize data using Magento 2.

call from a template or PHP class,
Using unserialize() objects original type would be the same, type of data wouldn’t be changed in serialize format.

echo $this->getSerializeData();

Output:

["code1” => "value1”]

Check the link for Convert Data into serialize format