MCPcopy Create free account
hub / github.com/authlib/authlib / parse_json

Method parse_json

authlib/jose/rfc7516/jwe.py:694–701  ·  view source on GitHub ↗

Parse JWE JSON Serialization. :param obj: JWE JSON Serialization as str or dict :return: Parsed JWE JSON Serialization as dict if `obj` is an str, or `obj` as is if `obj` is already a dict

(obj)

Source from the content-addressed store, hash-verified

692
693 @staticmethod
694 def parse_json(obj):
695 """Parse JWE JSON Serialization.
696
697 :param obj: JWE JSON Serialization as str or dict
698 :return: Parsed JWE JSON Serialization as dict if `obj` is an str,
699 or `obj` as is if `obj` is already a dict
700 """
701 return ensure_dict(obj, "JWE")
702
703 def get_header_alg(self, header):
704 if "alg" not in header:

Calls 1

ensure_dictFunction · 0.90