Class LdJsonConverters.AttributeRefConverter
The JSON converter for AttributeRef.
Inherited Members
Namespace: LaunchDarkly.Sdk.Json
Assembly: LaunchDarkly.CommonSdk.dll
Syntax
public sealed class LdJsonConverters.AttributeRefConverter : JsonConverter<AttributeRef>
Constructors
AttributeRefConverter()
Declaration
public AttributeRefConverter()
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read and convert the JSON to T.
Declaration
public override AttributeRef Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonReader | reader | The Utf8JsonReader to read from. |
| Type | typeToConvert | The Type being converted. |
| JsonSerializerOptions | options | The JsonSerializerOptions being used. |
Returns
| Type | Description |
|---|---|
| AttributeRef | The value that was converted. |
Overrides
Remarks
A converter may throw any Exception, but should throw
Write(Utf8JsonWriter, AttributeRef, JsonSerializerOptions)
Write the value as JSON.
Declaration
public override void Write(Utf8JsonWriter writer, AttributeRef value, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | The Utf8JsonWriter to write to. |
| AttributeRef | value | The value to convert. Note that the value of HandleNull determines if the converter handles null values. |
| JsonSerializerOptions | options | The JsonSerializerOptions being used. |
Overrides
Remarks
A converter may throw any Exception, but should throw