Method ObjectToJSON
ObjectToJSON(object?)
Converts the value into a JSON string. It is a simple convertor. It is better to use System.Text.Json.JsonSerializer.Serialize method.
public virtual string ObjectToJSON(object? v)
Parameters
v
objectThe value to convert.
Returns
- string
The JSON string representation of the value.
Remarks
Do not call it for primitive values. It supposed to convert only TypeCode.Object values. Outputs result like this: {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"}