/// <summary> /// Deserialzes JSON into a <see cref="JwtHeader"/> instance. /// </summary> /// <param name="jsonString"> The JSON to deserialize.</param> /// <returns>An instance of <see cref="JwtHeader"/>.</returns> /// <remarks>Use <see cref="JsonExtensions.Deserializer"/> to customize JSON serialization.</remarks> public static JwtHeader Deserialize(string jsonString) { return(JsonExtensions.DeserializeJwtHeader(jsonString)); }
/// <summary> /// Serializes this instance to JSON. /// </summary> /// <returns>This instance as JSON.</returns> /// <remarks>Use <see cref="JsonExtensions.Serializer"/> to customize JSON serialization.</remarks> public virtual string SerializeToJson() { return(JsonExtensions.SerializeToJson(this as IDictionary <string, object>)); }
/// <summary> /// Deserializes Base64UrlEncoded JSON into a <see cref="JwtHeader"/> instance. /// </summary> /// <param name="base64UrlEncodedJsonString">Base64url encoded JSON to deserialize.</param> /// <returns>An instance of <see cref="JwtHeader"/>.</returns> /// <remarks>Use <see cref="JsonExtensions.Deserializer"/> to customize JSON serialization.</remarks> public static JwtHeader Base64UrlDeserialize(string base64UrlEncodedJsonString) { return(JsonExtensions.DeserializeJwtHeader(Base64UrlEncoder.Decode(base64UrlEncodedJsonString))); }