UNPKG

@told.club/sdk-rn

Version:
19 lines (17 loc) 417 B
export function convertToJSONString( dictionary: Record<string, string> ): string { try { if (Object.keys(dictionary).length === 0) { return '[]'; } const jsonArray = Object.entries(dictionary).map(([key, value]) => ({ key, value, })); return JSON.stringify(jsonArray); } catch (error) { console.error('Error: JSONSerialization issue:', error); return '[]'; } }