public static function validateJson($data, callable $filter=null) {
        $decoded = json_decode($data);
        if ( is_null($decoded) ) return false;
        return self::applyFilter($data, $filter);
    }
public static function validateJson($data, callable $filter=null) {
        $decoded = json_decode($data);
        if ( is_null($decoded) ) return false;
        return self::applyFilter($data, $filter);
    }
public static function validateJson ( $ data , callable $ filter = null ) { $ decoded = json_decode ( $ data ) ; if ( is_null ( $ decoded ) ) return false ; return self :: applyFilter ( $ data , $ filter ) ; }
Json validator.

@param mixed $data Data to validate
@param callable $filter Custom filter
@return bool
Json validator .