String? encodeList(List<dynamic>? list) { if (list == null) return null; try { return json.encode(list); } catch (e) { logger.e('JsonUtils encodeList error: $e'); return null; } }