serialize function
Serializes the given object to a JSON string.
This function converts a Dart object into its JSON string representation using the provided serializer options or default options.
@param object The object to serialize to JSON.
@param options Optional serializer options to customize the serialization process.
If not provided, default options will be used.
@returns The JSON string representation of the object.
Implementation
String serialize(Object? object, [JsonSerializerOptions? options]) {
return JsonSerializer.serialize(object, options);
}