You are here

public static function Cleantalk::cleantalk_is_JSON in Anti Spam by CleanTalk 7.4

Same name and namespace in other branches
  1. 7.5 src/Cleantalk.php \Cleantalk::cleantalk_is_JSON()
1 call to Cleantalk::cleantalk_is_JSON()
Cleantalk::sendRequest in src/Cleantalk.php
Send JSON request to servers

File

src/Cleantalk.php, line 722

Class

Cleantalk
Cleantalk Base class

Code

public static function cleantalk_is_JSON($string) {
  return is_string($string) && (is_object(json_decode($string)) || is_array(json_decode($string))) ? true : false;
}