application/Espo/Core/Utils/Json.php
public static function isJSON($json)
    {
        if ($json === '[]' || $json === '{}') {
            return true;
        } else if (is_array($json)) {
            return false;
        }

        return static::decode($json) != null;
    }
public static function isJSON($json)
    {
        if ($json === '[]' || $json === '{}') {
            return true;
        } else if (is_array($json)) {
            return false;
        }

        return static::decode($json) != null;
    }
public static function isJSON ( $ json ) { if ( $ json === '[]' || $ json === '{}' ) { return true ; } else if ( is_array ( $ json ) ) { return false ; } return static :: decode ( $ json ) != null ; }
Check if the string is JSON

@param string $json
@return bool
Check if the string is JSON