Class Extensions
Text-related extension methods for all types.
Inheritance
System.Object
Extensions
Namespace: X10D.Text
Assembly: X10D.dll
Syntax
public static class Extensions : object
Methods
| Improve this Doc View SourceToJson<T>(T, Nullable<JsonSerializerOptions>)
Returns a JSON string representation of the specified value.
Declaration
public static string ToJson<T>(this T value, JsonSerializerOptions? options = null)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to convert. |
System.Nullable<JsonSerializerOptions> | options | The JSON serialization options. |
Returns
Type | Description |
---|---|
System.String | A JSON string representing the object. |
Type Parameters
Name | Description |
---|---|
T | The type of the value to convert. |