export function tryToJson(str, df) { try { if (!str) { return df || {}; } return JSON.parse(str) || df || {}; } catch { return df || {}; } }