You have to enable the extension for json as a php module. This may not be available to be a shared hosting and the solution may vary depending on the company you use and the panel you have to manage it.
Some are enabled in a directory of the root where there are files with the settings (they are usually few and you will quickly detect it if you find a php.ini file) but the most common is to find a section in the part where you edit the preferences for the virtual site that you manage.
Perhaps the best option would be to look in the documentation of the own panel of your hosting or to ask directly to the support of this.
Even so, as a guide I show you an example with the capture of one of my hosts where I have all the installed modules by default but I activate them by means of configuration files: