Class LdJsonSerialization
Inheritance
LdJsonSerialization
Assembly: LaunchDarkly.CommonSdk.dll
Syntax
public static class LdJsonSerialization
Methods
DeserializeObject<T>(string)
Declaration
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
public static T DeserializeObject<T>(string json) where T : IJsonSerializable
Parameters
| Type |
Name |
Description |
| string |
json |
|
Returns
Type Parameters
SerializeObjectToUtf8Bytes<T>(T)
Declaration
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
public static byte[] SerializeObjectToUtf8Bytes<T>(T instance) where T : IJsonSerializable
Parameters
| Type |
Name |
Description |
| T |
instance |
|
Returns
Type Parameters
SerializeObject<T>(T)
Declaration
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
public static string SerializeObject<T>(T instance) where T : IJsonSerializable
Parameters
| Type |
Name |
Description |
| T |
instance |
|
Returns
Type Parameters