src/JSONTools.php
public static function containsValidJSON($string)
	{
		try
		{
			$result = json_decode($string);
		}
		catch(\Exception $e)
		{}
		
		if(self::getJSONError() === NULL)
			return true;
		else
			return false;
	}
public static function containsValidJSON($string)
	{
		try
		{
			$result = json_decode($string);
		}
		catch(\Exception $e)
		{}
		
		if(self::getJSONError() === NULL)
			return true;
		else
			return false;
	}
public static function containsValidJSON ( $ string ) { try { $ result = json_decode ( $ string ) ; } catch ( \ Exception $ e ) { } if ( self :: getJSONError ( ) === NULL ) return true ; else return false ; }
Determines if a string contains a valid, decodable JSON object.

@param $string string to be tested

@return true, if given string contains valid JSON, else false
Determines if a string contains a valid decodable JSON object .