This question already has an answer here:

I want to install the JSON extension as is mentioned in prerequisites to use People Api by Google. You can refer to the documentation. I've php7 installed on Ubuntu 16.04.

share|improve this question

marked as duplicate by Paranoid Panda, Eric Carvalho, Andrea Lazzarotto, Kevin Bowen, Zanna May 30 '17 at 7:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I don't see where it is stated to install JSON extension, I believe Ubuntu programs can read that file already – George Udosen May 29 '17 at 6:00
    
@George "PHP 5.4 or greater with the command-line interface (CLI) and JSON extension installed." Copy/pasted line from the link I just shared, right under Prerequisites Heading. – naan May 29 '17 at 6:02
1  
Verify JSON extention installed or not using this command : apt-cache policy php5-json for php5.x and for apt-cache policy php-json for php7 – Nullpointer May 29 '17 at 6:04
1  
Please check if its there with php -m | grep -i json or sudo dpkg --list | grep php | grep -i json – George Udosen May 29 '17 at 6:07
1  
@George your command worked. It is already installed. Thanks – naan May 29 '17 at 6:10
up vote 1 down vote accepted

JSON support comes pre-compiled with current php versions you can check for installed php extensions with:

php -m

And to check which is installed for the current php versions use:

sudo dpkg --list | grep php | grep -i <extension_name>
share|improve this answer

The JSON extension is bundled with PHP 5.2 and up. See here for more information.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.