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