registerModelToJson function
Converts a RegisterModel object into a JSON string.
This function takes a RegisterModel object, converts it into a map
using the toJson method, and then encodes this map as a JSON string.
Parameters:
data - The RegisterModel object to be converted into a JSON string.
Returns: A JSON string representation of the RegisterModel object.
Implementation
String registerModelToJson(RegisterModel data) => json.encode(data.toJson());