internal string GetStandardClaim(string claimType)
        {
            object value = null;

            if (TryGetValue(claimType, out value))
            {
                string str = value as string;
                if (str != null)
                {
                    return(str);
                }

                return(JsonExtensions.SerializeToJson(value));
            }

            return(null);
        }
 /// <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>));
 }