serialize function
Serializes the given object
to a JSON string.
Optionally, you can provide options
to customize the serialization process.
Returns the JSON string representation of the object
.
Implementation
String serialize(Object? object, [JsonSerializerOptions? options]) {
return JsonSerializer.serialize(object, options);
}