How to check and get json object in WP database?

To check if a string from database is like a:2:{i:3;a:4:{s:5:”title”;s:0:””;s:4:”text”;s:503:”…}}, you can use the function is_serialized() To get the data as php array : if(is_serialized($data_as_string)){ $data_as_array = unserialize( $data_as_string); }

How to receive JSON payload from a digital device

Your exact code would depend on how the HTTP notification is sent to your server and on the structure of the JSON, but the first building block is to listen for the incoming post request. There are lots of WP hooks that would be suitable. One is init, e.g.: add_action(‘init’, function() { $user=”the_correct_basic_auth_username”; $password = … Read more

exclude particular category in api

I just figured it out, just in case it might be helpful for anyone in future: There is an option available to exclude a particular category – categories_exclude So, the new rest API would be: https://www.example.com/?rest_route=/wp/v2/posts&per_page=100&categories_exclude=10