示例#1
0
 /// <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));
 }
示例#2
0
 /// <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>));
 }
示例#3
0
 /// <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)));
 }