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