serialize function

String serialize(
  1. dynamic obj
)

Implementation

String serialize(dynamic obj) => json.encode(
      obj,
      toEncodable: (e) {
        try {
          return e.json;
        } on NoSuchMethodError catch (_) {
          print("Error: '${e.runtimeType}' has no property 'json'!");
          return null;
        }
      },
    );