Class LdJsonConverters.UserConverter
The JSON converter for User.
Inherited Members
Namespace: LaunchDarkly.Sdk.Json
Assembly: LaunchDarkly.CommonSdk.dll
Syntax
public sealed class LdJsonConverters.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 |
---|---|---|
Utf8JsonReader | reader | |
Type | typeToConvert | |
JsonSerializerOptions | options |
Returns
Type | Description |
---|---|
User |
Overrides
Write(Utf8JsonWriter, User, JsonSerializerOptions)
Declaration
public override void Write(Utf8JsonWriter writer, User u, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonWriter | writer | |
User | u | |
JsonSerializerOptions | options |