internal static TEnum GetValue <TEnum>( this OptionalMember <TEnum> instance, MissingMemberBehavior missingMemberBehavior ) where TEnum : struct, Enum => instance.Select( value => missingMemberBehavior == MissingMemberBehavior.Error ? Parse <TEnum>(value.GetStringRequired()) : TryHardParse <TEnum>(value.GetStringRequired()) );
internal static TEnum GetValue <TEnum>(this OptionalMember <TEnum> instance) where TEnum : struct, Enum => instance.Select(value => Parse <TEnum>(value.GetStringRequired()));
internal static string GetValueOrEmpty(this OptionalMember <string> instance) => instance.Select(json => json.GetString()) ?? "";
internal static bool GetValue(this OptionalMember <bool> instance) => instance.Select(json => json.GetBoolean());
internal static string?GetValueOrNull(this OptionalMember <string> instance) => instance.Select(json => json.GetString());