JsonHelperSerializeT(T, JsonSerializerOptions) Method
Returns a Json string of the provided object type.
Namespace: Common.Core.ClassesAssembly: Common.Core (in Common.Core.dll) Version: 2.1.5
public static string? Serialize<T>(
T obj,
JsonSerializerOptions? options = null
)
where T : class
- obj T
- Object to serialize.
- options JsonSerializerOptions (Optional)
- Optional Json serializer options.
- T
- Generic class or interface.
String is returned if the serialization fails.
NotSupportedException | Thrown when an invoked method is not supported, or when there
is an attempt to read, seek, or write to a stream that does not support the invoked functionality. |