Пример #1
0
void Subscription::toJSON(Dumais::JSON::JSON& json)
{
    Dumais::JSON::JSON& j = json.addObject("subscription");
    j.addValue(getID(),"id");
    j.addValue(mDevice,"device");
    j.addValue(mDeviceStatus,"devicestate");
}
Пример #2
0
void Insteon::listModules(Dumais::JSON::JSON& json)
{

    for (std::map<InsteonID,InsteonDevice*>::iterator it=mModules.begin();it!=mModules.end();it++)
    {
        Dumais::JSON::JSON& obj = json.addObject("module");
        it->second->toJSON(obj);
//        printf("TEST %s\r\n",obj.stringify(false).c_str());
    }
}