Skip to content

@mega-yfue/eufy-sdk / jsonObject

Function: jsonObject()

ts
function jsonObject(text): Record<string, unknown> | undefined;

Parse text as a JSON object, or undefined on any failure — never throws. Shared by the MQTT and Tuya transport layers; sits here so each module doesn't define its own copy.

Parameters

text

unknown

Returns

Record<string, unknown> | undefined

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.