JSON REST API, the term is much popular among developers. It is a plugin for WordPress to GET requests. The JASON REST API is a pretty useful plugin to build Apps with WordPress platform. For example, if you want to build an Android or iOS app to related to your blog, the JSON REST API is a must for the GET requests from your site to the app. It fetches the data from the WordPress site to your App. It is a data converter between two different platforms.
Now the latest news is the WordPress 4.4 version added the JSON REST API by default. Unless you are a developer the plugin is not useful for normal users. If you are not aware of this or not using the plugin it is better to uninstall it from your WordPress site. It is potentially harmful to your website indirectly, it is vulnerable to a new type of DDoS attacks.
How to Disable JSON REST API in WordPress
Disabling JSON REST API is an easy process. You can easily disable it by adding a code in your WordPress site theme’s functions.php file. Add the following code to your theme functions file.
add_filter('json_enabled', '__return_false');
add_filter('json_jsonp_enabled', '__return_false')
For those who are unable to edit functions.php file to add the code, we have a Plugin to deactivate it. Disable JSON API is a WordPress plugin which disables JSON after activation it. It starts working after installation and no settings or any tweaks are required.
I hope this article is useful to disable JSON REST API from WordPress, if you have any doubts or issues please comment below.