Returns true if value is valid JSON.
value
static bool isJson(String value) { try { jsonDecode(value); return true; } catch (_) { return false; } }