serialize method

String serialize(
  1. Object? obj
)

Serialize the object into a JSON string.

Implementation

String serialize(Object? obj) {
  String serialized = '';
  if (obj == null) {
    serialized = '';
  } else {
    serialized = json.encode(obj);
  }
  return serialized;
}