对象转json obj需要转换的对象
obj
static String toJson(Object? obj) { if (obj == null) { return ""; } try { return json.encode(obj); } catch (e) { return ""; } }