Show / Hide Table of Contents

Class LdJsonConverters.UserConverter

The JSON converter for User.

Inheritance
System.Object
LdJsonConverters.UserConverter
Namespace: LaunchDarkly.Sdk.Json
Assembly: LaunchDarkly.CommonSdk.dll
Syntax
public sealed class UserConverter : JsonConverter<User>
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 users is standardized across SDKs. It corresponds to the User model, rather than the richer Context model; any JSON representation of a User can also be decoded as a Context, but not vice versa.

Constructors

UserConverter()

Declaration
public UserConverter()

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Declaration
public override User Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type Name Description
System.Text.Json.Utf8JsonReader reader
System.Type typeToConvert
System.Text.Json.JsonSerializerOptions options
Returns
Type Description
User

Write(Utf8JsonWriter, User, JsonSerializerOptions)

Declaration
public override void Write(Utf8JsonWriter writer, User u, JsonSerializerOptions options)
Parameters
Type Name Description
System.Text.Json.Utf8JsonWriter writer
User u
System.Text.Json.JsonSerializerOptions options
In This Article
Back to top Generated by DocFX