PHP Fatal error: Call to undefined function json_decode()
sudo apt-get install php7.2-json
php5-json depending on the PHP version you're running)
Then of course make sure you restart Apache:
sudo service apache2 restart
Or if you are using PHP-FPM:
sudo service php7.2-fpm restart
Debian has removed the previous JSON extension as of PHP 5.5rc2 due to a license conflict.
The JSON license has a clause which states:
The Software shall be used for Good, not Evil.
This causes a problem with Free Software Foundation's definition of free software which states:
The freedom to run the program, for any purpose (freedom 0).
FSF goes on to specifically list the JSON license as nonfree.
Yes it seems a bit silly. Nevertheless Debian has removed the non-compliant JSON extension, and instead offered a replacement extension that is functionally equivalent.
To be clear: PHP itself has NOT removed JSON, it's still in master. This is a distro / package manager issue.
We have not removed json and we will never release a version of php without json support built in. Any changes in 5.5 is due to whatever distro packaging you are using which we have no control over.