def is_jws(self, jws):
        """

        :param jws:
        :return:
        """

        try:
            # JWS JSON serialization
            try:
                json_jws = json.loads(jws)
            except TypeError:
                jws = jws.decode('utf8')
                json_jws = json.loads(jws)

            return self._is_json_serialized_jws(json_jws)
        except ValueError:
            return self._is_compact_jws(jws)
def is_jws ( self , jws ) : try : try : json_jws = json . loads ( jws ) except TypeError : jws = jws . decode ( 'utf8' ) json_jws = json . loads ( jws ) return self . _is_json_serialized_jws ( json_jws ) except ValueError : return self . _is_compact_jws ( jws )
:param jws:
        :return: