public static function Helper::is_json in Anti Spam by CleanTalk 9.1.x
Same name and namespace in other branches
- 8.4 src/lib/Cleantalk/Common/Helper.php \Cleantalk\Common\Helper::is_json()
* Checks if the string is JSON type * *
Parameters
string: * * @return bool
File
- src/
lib/ Cleantalk/ Common/ Helper.php, line 1083
Class
- Helper
- CleanTalk Helper class. Compatible with any CMS.
Namespace
Cleantalk\CommonCode
public static function is_json($string) {
return is_string($string) && is_array(json_decode($string, true)) ? true : false;
}