Normaly you will use json_decode and json_encode in php to convert it into a PHP variable. But if you use this in magento, it is illegality. So, you must use JsonFactory class (Magento\Framework\Controller\Result\JsonFactory)

> Read More

View more threads in the same category: