You are here

public static function CleantalkHelper::is_json in Anti Spam by CleanTalk 7.4

Same name and namespace in other branches
  1. 7.5 src/CleantalkHelper.php \CleantalkHelper::is_json()

File

src/CleantalkHelper.php, line 629

Class

CleantalkHelper
Cleantalk's hepler class

Code

public static function is_json($string) {
  return is_string($string) && is_array(json_decode($string, true)) ? true : false;
}