LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Class LdJsonConverters.ContextConverter

    The JSON converter for Context.

    Inheritance
    object
    JsonConverter
    JsonConverter<Context>
    LdJsonConverters.ContextConverter
    Inherited Members
    JsonConverter<Context>.CanConvert(Type)
    JsonConverter<Context>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)
    JsonConverter<Context>.WriteAsPropertyName(Utf8JsonWriter, Context, JsonSerializerOptions)
    JsonConverter<Context>.HandleNull
    object.GetType()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LaunchDarkly.Sdk.Json
    Assembly: LaunchDarkly.CommonSdk.dll
    Syntax
    public sealed class LdJsonConverters.ContextConverter : JsonConverter<Context>
    Remarks

    Applications should not need to use this class directly. It is used automatically in System.Text.Json conversion, or if you call SerializeObject<T>(T) or DeserializeObject<T>(string)

    LaunchDarkly's JSON schema for contexts is standardized across SDKs. There are two serialization formats, depending on whether it is a single-kind context or a multi-kind context. There is also a third format corresponding to how users were represented in JSON in older LaunchDarkly SDKs; this format is recognized automatically and supported for deserialization, but is not supported for serialization.

    Constructors

    ContextConverter()

    Declaration
    public ContextConverter()

    Methods

    Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

    Declaration
    public override Context Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
    Parameters
    Type Name Description
    Utf8JsonReader reader
    Type typeToConvert
    JsonSerializerOptions options
    Returns
    Type Description
    Context
    Overrides
    JsonConverter<Context>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

    Write(Utf8JsonWriter, Context, JsonSerializerOptions)

    Declaration
    public override void Write(Utf8JsonWriter writer, Context c, JsonSerializerOptions options)
    Parameters
    Type Name Description
    Utf8JsonWriter writer
    Context c
    JsonSerializerOptions options
    Overrides
    JsonConverter<Context>.Write(Utf8JsonWriter, Context, JsonSerializerOptions)
    In this article
    Back to top Generated by DocFX