void
SamiAlgorithm::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pProblem_typeKey = new JsonString(L"problem_type");
        IJsonValue* pProblem_typeVal = null;
        pJsonObject->GetValue(pProblem_typeKey, pProblem_typeVal);
        if(pProblem_typeVal != null) {
            
            pProblem_type = new String();
            jsonToValue(pProblem_type, pProblem_typeVal, L"String", L"String");
        }
        delete pProblem_typeKey;
JsonString* pObjectiveKey = new JsonString(L"objective");
        IJsonValue* pObjectiveVal = null;
        pJsonObject->GetValue(pObjectiveKey, pObjectiveVal);
        if(pObjectiveVal != null) {
            
            pObjective = new String();
            jsonToValue(pObjective, pObjectiveVal, L"String", L"String");
        }
        delete pObjectiveKey;
    }
}
void
SamiNAThermMeasure::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pTimeKey = new JsonString(L"time");
        IJsonValue* pTimeVal = null;
        pJsonObject->GetValue(pTimeKey, pTimeVal);
        if(pTimeVal != null) {
            
            pTime = new Integer();
            jsonToValue(pTime, pTimeVal, L"Integer", L"Integer");
        }
        delete pTimeKey;
        JsonString* pTemperatureKey = new JsonString(L"temperature");
        IJsonValue* pTemperatureVal = null;
        pJsonObject->GetValue(pTemperatureKey, pTemperatureVal);
        if(pTemperatureVal != null) {
            
            pTemperature = new Float();
            jsonToValue(pTemperature, pTemperatureVal, L"Float", L"Float");
        }
        delete pTemperatureKey;
        JsonString* pSetpoint_tempKey = new JsonString(L"setpoint_temp");
        IJsonValue* pSetpoint_tempVal = null;
        pJsonObject->GetValue(pSetpoint_tempKey, pSetpoint_tempVal);
        if(pSetpoint_tempVal != null) {
            
            pSetpoint_temp = new Float();
            jsonToValue(pSetpoint_temp, pSetpoint_tempVal, L"Float", L"Float");
        }
        delete pSetpoint_tempKey;
        
    }
}
void
SamiApiResponse::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pCodeKey = new JsonString(L"code");
        IJsonValue* pCodeVal = null;
        pJsonObject->GetValue(pCodeKey, pCodeVal);
        if(pCodeVal != null) {
            
            pCode = new Integer();
            jsonToValue(pCode, pCodeVal, L"Integer", L"Integer");
        }
        delete pCodeKey;
JsonString* pTypeKey = new JsonString(L"type");
        IJsonValue* pTypeVal = null;
        pJsonObject->GetValue(pTypeKey, pTypeVal);
        if(pTypeVal != null) {
            
            pType = new String();
            jsonToValue(pType, pTypeVal, L"String", L"String");
        }
        delete pTypeKey;
JsonString* pMessageKey = new JsonString(L"message");
        IJsonValue* pMessageVal = null;
        pJsonObject->GetValue(pMessageKey, pMessageVal);
        if(pMessageVal != null) {
            
            pMessage = new String();
            jsonToValue(pMessage, pMessageVal, L"String", L"String");
        }
        delete pMessageKey;
    }
}
void
SamiCategory::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pIdKey = new JsonString(L"id");
        IJsonValue* pIdVal = null;
        pJsonObject->GetValue(pIdKey, pIdVal);
        if(pIdVal != null) {
            
            pId = new Long();
            jsonToValue(pId, pIdVal, L"Long", L"Long");
        }
        delete pIdKey;
        JsonString* pNameKey = new JsonString(L"name");
        IJsonValue* pNameVal = null;
        pJsonObject->GetValue(pNameKey, pNameVal);
        if(pNameVal != null) {
            
            pName = new String();
            jsonToValue(pName, pNameVal, L"String", L"String");
        }
        delete pNameKey;
        
    }
}
void
SamiMeasurementValue::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pStart_timeKey = new JsonString(L"start_time");
        IJsonValue* pStart_timeVal = null;
        pJsonObject->GetValue(pStart_timeKey, pStart_timeVal);
        if(pStart_timeVal != null) {
            
            pStart_time = new Long();
            jsonToValue(pStart_time, pStart_timeVal, L"Long", L"Long");
        }
        delete pStart_timeKey;
        JsonString* pValueKey = new JsonString(L"value");
        IJsonValue* pValueVal = null;
        pJsonObject->GetValue(pValueKey, pValueVal);
        if(pValueVal != null) {
            
            pValue = new Float();
            jsonToValue(pValue, pValueVal, L"Float", L"Float");
        }
        delete pValueKey;
        
    }
}
void
SamiPasswordChangeBody::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pOldPasswordKey = new JsonString(L"oldPassword");
        IJsonValue* pOldPasswordVal = null;
        pJsonObject->GetValue(pOldPasswordKey, pOldPasswordVal);
        if(pOldPasswordVal != null) {
            
            pOldPassword = new String();
            jsonToValue(pOldPassword, pOldPasswordVal, L"String", L"String");
        }
        delete pOldPasswordKey;
        JsonString* pNewPasswordKey = new JsonString(L"newPassword");
        IJsonValue* pNewPasswordVal = null;
        pJsonObject->GetValue(pNewPasswordKey, pNewPasswordVal);
        if(pNewPasswordVal != null) {
            
            pNewPassword = new String();
            jsonToValue(pNewPassword, pNewPasswordVal, L"String", L"String");
        }
        delete pNewPasswordKey;
        JsonString* pKeyKey = new JsonString(L"key");
        IJsonValue* pKeyVal = null;
        pJsonObject->GetValue(pKeyKey, pKeyVal);
        if(pKeyVal != null) {
            
            pKey = new String();
            jsonToValue(pKey, pKeyVal, L"String", L"String");
        }
        delete pKeyKey;
        
    }
}
void
SamiNATimeTableItem::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pIdKey = new JsonString(L"id");
        IJsonValue* pIdVal = null;
        pJsonObject->GetValue(pIdKey, pIdVal);
        if(pIdVal != null) {

            pId = new Integer();
            jsonToValue(pId, pIdVal, L"Integer", L"Integer");
        }
        delete pIdKey;
        JsonString* pM_offsetKey = new JsonString(L"m_offset");
        IJsonValue* pM_offsetVal = null;
        pJsonObject->GetValue(pM_offsetKey, pM_offsetVal);
        if(pM_offsetVal != null) {

            pM_offset = new Integer();
            jsonToValue(pM_offset, pM_offsetVal, L"Integer", L"Integer");
        }
        delete pM_offsetKey;

    }
}
Exemple #8
0
void
SamiQuery::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pIncludeListKey = new JsonString(L"$includeList");
        IJsonValue* pIncludeListVal = null;
        pJsonObject->GetValue(pIncludeListKey, pIncludeListVal);
        if(pIncludeListVal != null) {
            pIncludeList = new ArrayList();
            
            jsonToValue(pIncludeList, pIncludeListVal, L"IList", L"String");
        }
        delete pIncludeListKey;
        JsonString* pIncludeKey = new JsonString(L"$include");
        IJsonValue* pIncludeVal = null;
        pJsonObject->GetValue(pIncludeKey, pIncludeVal);
        if(pIncludeVal != null) {
            pInclude = new ArrayList();
            
            jsonToValue(pInclude, pIncludeVal, L"IList", L"String");
        }
        delete pIncludeKey;
        
    }
}
void
SamiStatus::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pCodeKey = new JsonString(L"code");
        IJsonValue* pCodeVal = null;
        pJsonObject->GetValue(pCodeKey, pCodeVal);
        if(pCodeVal != null) {
            
            pCode = new String();
            jsonToValue(pCode, pCodeVal, L"String", L"String");
        }
        delete pCodeKey;
        JsonString* pInfoKey = new JsonString(L"info");
        IJsonValue* pInfoVal = null;
        pJsonObject->GetValue(pInfoKey, pInfoVal);
        if(pInfoVal != null) {
            
            pInfo = new String();
            jsonToValue(pInfo, pInfoVal, L"String", L"String");
        }
        delete pInfoKey;
        
    }
}
void
SamiNAMeasureBodyElem::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pBeg_timeKey = new JsonString(L"beg_time");
        IJsonValue* pBeg_timeVal = null;
        pJsonObject->GetValue(pBeg_timeKey, pBeg_timeVal);
        if(pBeg_timeVal != null) {
            
            pBeg_time = new Integer();
            jsonToValue(pBeg_time, pBeg_timeVal, L"Integer", L"Integer");
        }
        delete pBeg_timeKey;
        JsonString* pStep_timeKey = new JsonString(L"step_time");
        IJsonValue* pStep_timeVal = null;
        pJsonObject->GetValue(pStep_timeKey, pStep_timeVal);
        if(pStep_timeVal != null) {
            
            pStep_time = new Integer();
            jsonToValue(pStep_time, pStep_timeVal, L"Integer", L"Integer");
        }
        delete pStep_timeKey;
        JsonString* pValueKey = new JsonString(L"value");
        IJsonValue* pValueVal = null;
        pJsonObject->GetValue(pValueKey, pValueVal);
        if(pValueVal != null) {
            pValue = new ArrayList();
            
            jsonToValue(pValue, pValueVal, L"IList", L"IList");
        }
        delete pValueKey;
        
    }
}
void
SamiInline_response_200_28::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pDataKey = new JsonString(L"data");
        IJsonValue* pDataVal = null;
        pJsonObject->GetValue(pDataKey, pDataVal);
        if(pDataVal != null) {
            
            pData = new SamiVariable();
            jsonToValue(pData, pDataVal, L"SamiVariable", L"SamiVariable");
        }
        delete pDataKey;
        JsonString* pSuccessKey = new JsonString(L"success");
        IJsonValue* pSuccessVal = null;
        pJsonObject->GetValue(pSuccessKey, pSuccessVal);
        if(pSuccessVal != null) {
            
            pSuccess = new Boolean(false);
            jsonToValue(pSuccess, pSuccessVal, L"Boolean", L"Boolean");
        }
        delete pSuccessKey;
        
    }
}
Exemple #12
0
void
SamiQueueBody::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pDocumentKey = new JsonString(L"document");
        IJsonValue* pDocumentVal = null;
        pJsonObject->GetValue(pDocumentKey, pDocumentVal);
        if(pDocumentVal != null) {
            
            pDocument = new SamiQueue();
            jsonToValue(pDocument, pDocumentVal, L"SamiQueue", L"SamiQueue");
        }
        delete pDocumentKey;
        JsonString* pKeyKey = new JsonString(L"key");
        IJsonValue* pKeyVal = null;
        pJsonObject->GetValue(pKeyKey, pKeyVal);
        if(pKeyVal != null) {
            
            pKey = new String();
            jsonToValue(pKey, pKeyVal, L"String", L"String");
        }
        delete pKeyKey;
        
    }
}
void
SamiAccessToken::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pAccess_tokenKey = new JsonString(L"access_token");
        IJsonValue* pAccess_tokenVal = null;
        pJsonObject->GetValue(pAccess_tokenKey, pAccess_tokenVal);
        if(pAccess_tokenVal != null) {
            
            pAccess_token = new String();
            jsonToValue(pAccess_token, pAccess_tokenVal, L"String", L"String");
        }
        delete pAccess_tokenKey;
        JsonString* pRefresh_tokenKey = new JsonString(L"refresh_token");
        IJsonValue* pRefresh_tokenVal = null;
        pJsonObject->GetValue(pRefresh_tokenKey, pRefresh_tokenVal);
        if(pRefresh_tokenVal != null) {
            
            pRefresh_token = new String();
            jsonToValue(pRefresh_token, pRefresh_tokenVal, L"String", L"String");
        }
        delete pRefresh_tokenKey;
        JsonString* pExpire_inKey = new JsonString(L"expire_in");
        IJsonValue* pExpire_inVal = null;
        pJsonObject->GetValue(pExpire_inKey, pExpire_inVal);
        if(pExpire_inVal != null) {
            
            pExpire_in = new Integer();
            jsonToValue(pExpire_in, pExpire_inVal, L"Integer", L"Integer");
        }
        delete pExpire_inKey;
        JsonString* pExpires_inKey = new JsonString(L"expires_in");
        IJsonValue* pExpires_inVal = null;
        pJsonObject->GetValue(pExpires_inKey, pExpires_inVal);
        if(pExpires_inVal != null) {
            
            pExpires_in = new Integer();
            jsonToValue(pExpires_in, pExpires_inVal, L"Integer", L"Integer");
        }
        delete pExpires_inKey;
        JsonString* pScopeKey = new JsonString(L"scope");
        IJsonValue* pScopeVal = null;
        pJsonObject->GetValue(pScopeKey, pScopeVal);
        if(pScopeVal != null) {
            pScope = new ArrayList();
            
            jsonToValue(pScope, pScopeVal, L"IList", L"String");
        }
        delete pScopeKey;
        
    }
}
void
saveProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
  int code = pHttpResponse->GetHttpStatusCode();

  if(code >= 200 && code < 300) {
    ByteBuffer* pBuffer = pHttpResponse->ReadBodyN();
    IJsonValue* pJson = JsonParser::ParseN(*pBuffer);

    SamiCloudObject* out = new SamiCloudObject();
    jsonToValue(out, pJson, L"SamiCloudObject*", L"SamiCloudObject");

    if (pJson) {
      if (pJson->GetType() == JSON_TYPE_OBJECT) {
         JsonObject* pObject = static_cast< JsonObject* >(pJson);
         pObject->RemoveAll(true);
      }
      else if (pJson->GetType() == JSON_TYPE_ARRAY) {
         JsonArray* pArray = static_cast< JsonArray* >(pJson);
         pArray->RemoveAll(true);
      }
      handler(out, null);
    }
    else {
      SamiError* error = new SamiError(0, new String(L"No parsable response received"));
      handler(null, error);
    }
    
  }
  else {
    SamiError* error = new SamiError(code, new String(pHttpResponse->GetStatusText()));
    handler(null, error);
    
  }
}
void
SamiMemberReports::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pMember_reportsKey = new JsonString(L"member_reports");
        IJsonValue* pMember_reportsVal = null;
        pJsonObject->GetValue(pMember_reportsKey, pMember_reportsVal);
        if(pMember_reportsVal != null) {
            pMember_reports = new ArrayList();
            
            jsonToValue(pMember_reports, pMember_reportsVal, L"IList", L"SamiMemberReport");
        }
        delete pMember_reportsKey;
        
    }
}
void
SamiFeatures::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* p_idKey = new JsonString(L"_id");
        IJsonValue* p_idVal = null;
        pJsonObject->GetValue(p_idKey, p_idVal);
        if(p_idVal != null) {
            
            p_id = new String();
            jsonToValue(p_id, p_idVal, L"String", L"String");
        }
        delete p_idKey;
        
    }
}
void
SamiPostrequest::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pPostKey = new JsonString(L"post");
        IJsonValue* pPostVal = null;
        pJsonObject->GetValue(pPostKey, pPostVal);
        if(pPostVal != null) {
            
            pPost = new SamiPostInput();
            jsonToValue(pPost, pPostVal, L"SamiPostInput", L"SamiPostInput");
        }
        delete pPostKey;
        
    }
}
void
SamiShowcaseDatatypeDate::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pDateKey = new JsonString(L"date");
        IJsonValue* pDateVal = null;
        pJsonObject->GetValue(pDateKey, pDateVal);
        if(pDateVal != null) {
            
            pDate = new DateTime();
            jsonToValue(pDate, pDateVal, L"DateTime", L"DateTime");
        }
        delete pDateKey;
        
    }
}
void
SamiNewsletterSettingsInput::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pNewsletter_settingKey = new JsonString(L"newsletter_setting");
        IJsonValue* pNewsletter_settingVal = null;
        pJsonObject->GetValue(pNewsletter_settingKey, pNewsletter_settingVal);
        if(pNewsletter_settingVal != null) {
            
            pNewsletter_setting = new SamiNewsletterSetting();
            jsonToValue(pNewsletter_setting, pNewsletter_settingVal, L"SamiNewsletterSetting", L"SamiNewsletterSetting");
        }
        delete pNewsletter_settingKey;
        
    }
}
Exemple #20
0
void
SamiBoolQuery::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pBoolKey = new JsonString(L"bool");
        IJsonValue* pBoolVal = null;
        pJsonObject->GetValue(pBoolKey, pBoolVal);
        if(pBoolVal != null) {
            
            pBool = new SamiSearchQuery();
            jsonToValue(pBool, pBoolVal, L"SamiSearchQuery", L"SamiSearchQuery");
        }
        delete pBoolKey;
        
    }
}
void
SamiNASimpleAlgo::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pHigh_deadbandKey = new JsonString(L"high_deadband");
        IJsonValue* pHigh_deadbandVal = null;
        pJsonObject->GetValue(pHigh_deadbandKey, pHigh_deadbandVal);
        if(pHigh_deadbandVal != null) {
            
            pHigh_deadband = new Integer();
            jsonToValue(pHigh_deadband, pHigh_deadbandVal, L"Integer", L"Integer");
        }
        delete pHigh_deadbandKey;
        
    }
}
void
SamiMemberresponse::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pMemberKey = new JsonString(L"member");
        IJsonValue* pMemberVal = null;
        pJsonObject->GetValue(pMemberKey, pMemberVal);
        if(pMemberVal != null) {
            
            pMember = new SamiMember();
            jsonToValue(pMember, pMemberVal, L"SamiMember", L"SamiMember");
        }
        delete pMemberKey;
        
    }
}
void
SamiSources::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pSourcesKey = new JsonString(L"sources");
        IJsonValue* pSourcesVal = null;
        pJsonObject->GetValue(pSourcesKey, pSourcesVal);
        if(pSourcesVal != null) {
            pSources = new ArrayList();
            
            jsonToValue(pSources, pSourcesVal, L"IList", L"SamiSource");
        }
        delete pSourcesKey;
        
    }
}
void
SamiSolution::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pCostsKey = new JsonString(L"costs");
        IJsonValue* pCostsVal = null;
        pJsonObject->GetValue(pCostsKey, pCostsVal);
        if(pCostsVal != null) {
            
            pCosts = new Integer();
            jsonToValue(pCosts, pCostsVal, L"Integer", L"Integer");
        }
        delete pCostsKey;
JsonString* pDistanceKey = new JsonString(L"distance");
        IJsonValue* pDistanceVal = null;
        pJsonObject->GetValue(pDistanceKey, pDistanceVal);
        if(pDistanceVal != null) {
            
            pDistance = new Integer();
            jsonToValue(pDistance, pDistanceVal, L"Integer", L"Integer");
        }
        delete pDistanceKey;
JsonString* pTimeKey = new JsonString(L"time");
        IJsonValue* pTimeVal = null;
        pJsonObject->GetValue(pTimeKey, pTimeVal);
        if(pTimeVal != null) {
            
            pTime = new Long();
            jsonToValue(pTime, pTimeVal, L"Long", L"Long");
        }
        delete pTimeKey;
JsonString* pTransport_timeKey = new JsonString(L"transport_time");
        IJsonValue* pTransport_timeVal = null;
        pJsonObject->GetValue(pTransport_timeKey, pTransport_timeVal);
        if(pTransport_timeVal != null) {
            
            pTransport_time = new Long();
            jsonToValue(pTransport_time, pTransport_timeVal, L"Long", L"Long");
        }
        delete pTransport_timeKey;
JsonString* pMax_operation_timeKey = new JsonString(L"max_operation_time");
        IJsonValue* pMax_operation_timeVal = null;
        pJsonObject->GetValue(pMax_operation_timeKey, pMax_operation_timeVal);
        if(pMax_operation_timeVal != null) {
            
            pMax_operation_time = new Long();
            jsonToValue(pMax_operation_time, pMax_operation_timeVal, L"Long", L"Long");
        }
        delete pMax_operation_timeKey;
JsonString* pWaiting_timeKey = new JsonString(L"waiting_time");
        IJsonValue* pWaiting_timeVal = null;
        pJsonObject->GetValue(pWaiting_timeKey, pWaiting_timeVal);
        if(pWaiting_timeVal != null) {
            
            pWaiting_time = new Long();
            jsonToValue(pWaiting_time, pWaiting_timeVal, L"Long", L"Long");
        }
        delete pWaiting_timeKey;
JsonString* pNo_vehiclesKey = new JsonString(L"no_vehicles");
        IJsonValue* pNo_vehiclesVal = null;
        pJsonObject->GetValue(pNo_vehiclesKey, pNo_vehiclesVal);
        if(pNo_vehiclesVal != null) {
            
            pNo_vehicles = new Integer();
            jsonToValue(pNo_vehicles, pNo_vehiclesVal, L"Integer", L"Integer");
        }
        delete pNo_vehiclesKey;
JsonString* pNo_unassignedKey = new JsonString(L"no_unassigned");
        IJsonValue* pNo_unassignedVal = null;
        pJsonObject->GetValue(pNo_unassignedKey, pNo_unassignedVal);
        if(pNo_unassignedVal != null) {
            
            pNo_unassigned = new Integer();
            jsonToValue(pNo_unassigned, pNo_unassignedVal, L"Integer", L"Integer");
        }
        delete pNo_unassignedKey;
JsonString* pRoutesKey = new JsonString(L"routes");
        IJsonValue* pRoutesVal = null;
        pJsonObject->GetValue(pRoutesKey, pRoutesVal);
        if(pRoutesVal != null) {
            pRoutes = new ArrayList();
            
            jsonToValue(pRoutes, pRoutesVal, L"IList", L"SamiRoute");
        }
        delete pRoutesKey;
JsonString* pUnassignedKey = new JsonString(L"unassigned");
        IJsonValue* pUnassignedVal = null;
        pJsonObject->GetValue(pUnassignedKey, pUnassignedVal);
        if(pUnassignedVal != null) {
            
            pUnassigned = new SamiSolution_unassigned();
            jsonToValue(pUnassigned, pUnassignedVal, L"SamiSolution_unassigned", L"SamiSolution_unassigned");
        }
        delete pUnassignedKey;
    }
}
void
SamiMemberReport::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pDayKey = new JsonString(L"day");
        IJsonValue* pDayVal = null;
        pJsonObject->GetValue(pDayKey, pDayVal);
        if(pDayVal != null) {
            
            pDay = new Integer();
            jsonToValue(pDay, pDayVal, L"Integer", L"Integer");
        }
        delete pDayKey;
        JsonString* pEvent_countKey = new JsonString(L"event_count");
        IJsonValue* pEvent_countVal = null;
        pJsonObject->GetValue(pEvent_countKey, pEvent_countVal);
        if(pEvent_countVal != null) {
            
            pEvent_count = new Integer();
            jsonToValue(pEvent_count, pEvent_countVal, L"Integer", L"Integer");
        }
        delete pEvent_countKey;
        JsonString* pOriginator_group_idKey = new JsonString(L"originator_group_id");
        IJsonValue* pOriginator_group_idVal = null;
        pJsonObject->GetValue(pOriginator_group_idKey, pOriginator_group_idVal);
        if(pOriginator_group_idVal != null) {
            
            pOriginator_group_id = new String();
            jsonToValue(pOriginator_group_id, pOriginator_group_idVal, L"String", L"String");
        }
        delete pOriginator_group_idKey;
        JsonString* pParent_originator_idKey = new JsonString(L"parent_originator_id");
        IJsonValue* pParent_originator_idVal = null;
        pJsonObject->GetValue(pParent_originator_idKey, pParent_originator_idVal);
        if(pParent_originator_idVal != null) {
            
            pParent_originator_id = new String();
            jsonToValue(pParent_originator_id, pParent_originator_idVal, L"String", L"String");
        }
        delete pParent_originator_idKey;
        JsonString* pSourceKey = new JsonString(L"source");
        IJsonValue* pSourceVal = null;
        pJsonObject->GetValue(pSourceKey, pSourceVal);
        if(pSourceVal != null) {
            
            pSource = new String();
            jsonToValue(pSource, pSourceVal, L"String", L"String");
        }
        delete pSourceKey;
        JsonString* pTypeKey = new JsonString(L"type");
        IJsonValue* pTypeVal = null;
        pJsonObject->GetValue(pTypeKey, pTypeVal);
        if(pTypeVal != null) {
            
            pType = new String();
            jsonToValue(pType, pTypeVal, L"String", L"String");
        }
        delete pTypeKey;
        JsonString* pYearKey = new JsonString(L"year");
        IJsonValue* pYearVal = null;
        pJsonObject->GetValue(pYearKey, pYearVal);
        if(pYearVal != null) {
            
            pYear = new Integer();
            jsonToValue(pYear, pYearVal, L"Integer", L"Integer");
        }
        delete pYearKey;
        
    }
}
Exemple #26
0
void
SamiEvent::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* p_idKey = new JsonString(L"_id");
        IJsonValue* p_idVal = null;
        pJsonObject->GetValue(p_idKey, p_idVal);
        if(p_idVal != null) {
            
            p_id = new String();
            jsonToValue(p_id, p_idVal, L"String", L"String");
        }
        delete p_idKey;
        JsonString* pTypeKey = new JsonString(L"type");
        IJsonValue* pTypeVal = null;
        pJsonObject->GetValue(pTypeKey, pTypeVal);
        if(pTypeVal != null) {
            
            pType = new String();
            jsonToValue(pType, pTypeVal, L"String", L"String");
        }
        delete pTypeKey;
        JsonString* pRefererKey = new JsonString(L"referer");
        IJsonValue* pRefererVal = null;
        pJsonObject->GetValue(pRefererKey, pRefererVal);
        if(pRefererVal != null) {
            
            pReferer = new String();
            jsonToValue(pReferer, pRefererVal, L"String", L"String");
        }
        delete pRefererKey;
        JsonString* pOriginal_urlKey = new JsonString(L"original_url");
        IJsonValue* pOriginal_urlVal = null;
        pJsonObject->GetValue(pOriginal_urlKey, pOriginal_urlVal);
        if(pOriginal_urlVal != null) {
            
            pOriginal_url = new String();
            jsonToValue(pOriginal_url, pOriginal_urlVal, L"String", L"String");
        }
        delete pOriginal_urlKey;
        JsonString* pOriginator_emailKey = new JsonString(L"originator_email");
        IJsonValue* pOriginator_emailVal = null;
        pJsonObject->GetValue(pOriginator_emailKey, pOriginator_emailVal);
        if(pOriginator_emailVal != null) {
            
            pOriginator_email = new String();
            jsonToValue(pOriginator_email, pOriginator_emailVal, L"String", L"String");
        }
        delete pOriginator_emailKey;
        JsonString* pSubject_emailKey = new JsonString(L"subject_email");
        IJsonValue* pSubject_emailVal = null;
        pJsonObject->GetValue(pSubject_emailKey, pSubject_emailVal);
        if(pSubject_emailVal != null) {
            
            pSubject_email = new String();
            jsonToValue(pSubject_email, pSubject_emailVal, L"String", L"String");
        }
        delete pSubject_emailKey;
        JsonString* pParent_event_idKey = new JsonString(L"parent_event_id");
        IJsonValue* pParent_event_idVal = null;
        pJsonObject->GetValue(pParent_event_idKey, pParent_event_idVal);
        if(pParent_event_idVal != null) {
            
            pParent_event_id = new String();
            jsonToValue(pParent_event_id, pParent_event_idVal, L"String", L"String");
        }
        delete pParent_event_idKey;
        JsonString* pOriginator_idKey = new JsonString(L"originator_id");
        IJsonValue* pOriginator_idVal = null;
        pJsonObject->GetValue(pOriginator_idKey, pOriginator_idVal);
        if(pOriginator_idVal != null) {
            
            pOriginator_id = new String();
            jsonToValue(pOriginator_id, pOriginator_idVal, L"String", L"String");
        }
        delete pOriginator_idKey;
        JsonString* pAdvisor_idKey = new JsonString(L"advisor_id");
        IJsonValue* pAdvisor_idVal = null;
        pJsonObject->GetValue(pAdvisor_idKey, pAdvisor_idVal);
        if(pAdvisor_idVal != null) {
            
            pAdvisor_id = new String();
            jsonToValue(pAdvisor_id, pAdvisor_idVal, L"String", L"String");
        }
        delete pAdvisor_idKey;
        JsonString* pSubject_idKey = new JsonString(L"subject_id");
        IJsonValue* pSubject_idVal = null;
        pJsonObject->GetValue(pSubject_idKey, pSubject_idVal);
        if(pSubject_idVal != null) {
            
            pSubject_id = new String();
            jsonToValue(pSubject_id, pSubject_idVal, L"String", L"String");
        }
        delete pSubject_idKey;
        JsonString* pEvent_contentKey = new JsonString(L"event_content");
        IJsonValue* pEvent_contentVal = null;
        pJsonObject->GetValue(pEvent_contentKey, pEvent_contentVal);
        if(pEvent_contentVal != null) {
            
            pEvent_content = new SamiEventContent();
            jsonToValue(pEvent_content, pEvent_contentVal, L"SamiEventContent", L"SamiEventContent");
        }
        delete pEvent_contentKey;
        JsonString* pCreated_atKey = new JsonString(L"created_at");
        IJsonValue* pCreated_atVal = null;
        pJsonObject->GetValue(pCreated_atKey, pCreated_atVal);
        if(pCreated_atVal != null) {
            
            pCreated_at = new String();
            jsonToValue(pCreated_at, pCreated_atVal, L"String", L"String");
        }
        delete pCreated_atKey;
        
    }
}
void
SamiShowcaseDatatypePrimitives::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pSingleByteKey = new JsonString(L"singleByte");
        IJsonValue* pSingleByteVal = null;
        pJsonObject->GetValue(pSingleByteKey, pSingleByteVal);
        if(pSingleByteVal != null) {
            
            pSingleByte = new String();
            jsonToValue(pSingleByte, pSingleByteVal, L"String", L"String");
        }
        delete pSingleByteKey;
        JsonString* pTinyNumberKey = new JsonString(L"tinyNumber");
        IJsonValue* pTinyNumberVal = null;
        pJsonObject->GetValue(pTinyNumberKey, pTinyNumberVal);
        if(pTinyNumberVal != null) {
            
            pTinyNumber = new Integer();
            jsonToValue(pTinyNumber, pTinyNumberVal, L"Integer", L"Integer");
        }
        delete pTinyNumberKey;
        JsonString* pCounterKey = new JsonString(L"counter");
        IJsonValue* pCounterVal = null;
        pJsonObject->GetValue(pCounterKey, pCounterVal);
        if(pCounterVal != null) {
            
            pCounter = new Integer();
            jsonToValue(pCounter, pCounterVal, L"Integer", L"Integer");
        }
        delete pCounterKey;
        JsonString* pIdKey = new JsonString(L"id");
        IJsonValue* pIdVal = null;
        pJsonObject->GetValue(pIdKey, pIdVal);
        if(pIdVal != null) {
            
            pId = new Long();
            jsonToValue(pId, pIdVal, L"Long", L"Long");
        }
        delete pIdKey;
        JsonString* pBudgetFloatKey = new JsonString(L"budgetFloat");
        IJsonValue* pBudgetFloatVal = null;
        pJsonObject->GetValue(pBudgetFloatKey, pBudgetFloatVal);
        if(pBudgetFloatVal != null) {
            
            pBudgetFloat = new Long();
            jsonToValue(pBudgetFloat, pBudgetFloatVal, L"Long", L"Long");
        }
        delete pBudgetFloatKey;
        JsonString* pBudgetKey = new JsonString(L"budget");
        IJsonValue* pBudgetVal = null;
        pJsonObject->GetValue(pBudgetKey, pBudgetVal);
        if(pBudgetVal != null) {
            
            pBudget = new Double();
            jsonToValue(pBudget, pBudgetVal, L"Double", L"Double");
        }
        delete pBudgetKey;
        JsonString* pDeletedKey = new JsonString(L"deleted");
        IJsonValue* pDeletedVal = null;
        pJsonObject->GetValue(pDeletedKey, pDeletedVal);
        if(pDeletedVal != null) {
            
            pDeleted = new Boolean(false);
            jsonToValue(pDeleted, pDeletedVal, L"Boolean", L"Boolean");
        }
        delete pDeletedKey;
        JsonString* pSingleCharacterKey = new JsonString(L"singleCharacter");
        IJsonValue* pSingleCharacterVal = null;
        pJsonObject->GetValue(pSingleCharacterKey, pSingleCharacterVal);
        if(pSingleCharacterVal != null) {
            
            pSingleCharacter = new String();
            jsonToValue(pSingleCharacter, pSingleCharacterVal, L"String", L"String");
        }
        delete pSingleCharacterKey;
        
    }
}
void
SamiNAPlace::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pCityKey = new JsonString(L"city");
        IJsonValue* pCityVal = null;
        pJsonObject->GetValue(pCityKey, pCityVal);
        if(pCityVal != null) {
            
            pCity = new String();
            jsonToValue(pCity, pCityVal, L"String", L"String");
        }
        delete pCityKey;
        JsonString* pAltitudeKey = new JsonString(L"altitude");
        IJsonValue* pAltitudeVal = null;
        pJsonObject->GetValue(pAltitudeKey, pAltitudeVal);
        if(pAltitudeVal != null) {
            
            pAltitude = new Float();
            jsonToValue(pAltitude, pAltitudeVal, L"Float", L"Float");
        }
        delete pAltitudeKey;
        JsonString* pCountryKey = new JsonString(L"country");
        IJsonValue* pCountryVal = null;
        pJsonObject->GetValue(pCountryKey, pCountryVal);
        if(pCountryVal != null) {
            
            pCountry = new String();
            jsonToValue(pCountry, pCountryVal, L"String", L"String");
        }
        delete pCountryKey;
        JsonString* pFrom_ipKey = new JsonString(L"from_ip");
        IJsonValue* pFrom_ipVal = null;
        pJsonObject->GetValue(pFrom_ipKey, pFrom_ipVal);
        if(pFrom_ipVal != null) {
            
            pFrom_ip = new Boolean(false);
            jsonToValue(pFrom_ip, pFrom_ipVal, L"Boolean", L"Boolean");
        }
        delete pFrom_ipKey;
        JsonString* pImproveLocProposedKey = new JsonString(L"improveLocProposed");
        IJsonValue* pImproveLocProposedVal = null;
        pJsonObject->GetValue(pImproveLocProposedKey, pImproveLocProposedVal);
        if(pImproveLocProposedVal != null) {
            
            pImproveLocProposed = new Boolean(false);
            jsonToValue(pImproveLocProposed, pImproveLocProposedVal, L"Boolean", L"Boolean");
        }
        delete pImproveLocProposedKey;
        JsonString* pLocationKey = new JsonString(L"location");
        IJsonValue* pLocationVal = null;
        pJsonObject->GetValue(pLocationKey, pLocationVal);
        if(pLocationVal != null) {
            pLocation = new ArrayList();
            
            jsonToValue(pLocation, pLocationVal, L"IList", L"Double");
        }
        delete pLocationKey;
        JsonString* pTimezoneKey = new JsonString(L"timezone");
        IJsonValue* pTimezoneVal = null;
        pJsonObject->GetValue(pTimezoneKey, pTimezoneVal);
        if(pTimezoneVal != null) {
            
            pTimezone = new String();
            jsonToValue(pTimezone, pTimezoneVal, L"String", L"String");
        }
        delete pTimezoneKey;
        JsonString* pTrust_locationKey = new JsonString(L"trust_location");
        IJsonValue* pTrust_locationVal = null;
        pJsonObject->GetValue(pTrust_locationKey, pTrust_locationVal);
        if(pTrust_locationVal != null) {
            
            pTrust_location = new Boolean(false);
            jsonToValue(pTrust_location, pTrust_locationVal, L"Boolean", L"Boolean");
        }
        delete pTrust_locationKey;
        
    }
}
void
SamiNAThermStateBody::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pSetpointKey = new JsonString(L"setpoint");
        IJsonValue* pSetpointVal = null;
        pJsonObject->GetValue(pSetpointKey, pSetpointVal);
        if(pSetpointVal != null) {
            
            pSetpoint = new SamiNASetpoint();
            jsonToValue(pSetpoint, pSetpointVal, L"SamiNASetpoint", L"SamiNASetpoint");
        }
        delete pSetpointKey;
        JsonString* pSetpoint_orderKey = new JsonString(L"setpoint_order");
        IJsonValue* pSetpoint_orderVal = null;
        pJsonObject->GetValue(pSetpoint_orderKey, pSetpoint_orderVal);
        if(pSetpoint_orderVal != null) {
            
            pSetpoint_order = new SamiNASetpoint();
            jsonToValue(pSetpoint_order, pSetpoint_orderVal, L"SamiNASetpoint", L"SamiNASetpoint");
        }
        delete pSetpoint_orderKey;
        JsonString* pTherm_programKey = new JsonString(L"therm_program");
        IJsonValue* pTherm_programVal = null;
        pJsonObject->GetValue(pTherm_programKey, pTherm_programVal);
        if(pTherm_programVal != null) {
            
            pTherm_program = new SamiNAThermProgram();
            jsonToValue(pTherm_program, pTherm_programVal, L"SamiNAThermProgram", L"SamiNAThermProgram");
        }
        delete pTherm_programKey;
        JsonString* pTherm_program_backupKey = new JsonString(L"therm_program_backup");
        IJsonValue* pTherm_program_backupVal = null;
        pJsonObject->GetValue(pTherm_program_backupKey, pTherm_program_backupVal);
        if(pTherm_program_backupVal != null) {
            pTherm_program_backup = new ArrayList();
            
            jsonToValue(pTherm_program_backup, pTherm_program_backupVal, L"IList", L"SamiNAThermProgram");
        }
        delete pTherm_program_backupKey;
        JsonString* pTherm_program_orderKey = new JsonString(L"therm_program_order");
        IJsonValue* pTherm_program_orderVal = null;
        pJsonObject->GetValue(pTherm_program_orderKey, pTherm_program_orderVal);
        if(pTherm_program_orderVal != null) {
            
            pTherm_program_order = new SamiNAThermProgram();
            jsonToValue(pTherm_program_order, pTherm_program_orderVal, L"SamiNAThermProgram", L"SamiNAThermProgram");
        }
        delete pTherm_program_orderKey;
        JsonString* pTherm_orientationKey = new JsonString(L"therm_orientation");
        IJsonValue* pTherm_orientationVal = null;
        pJsonObject->GetValue(pTherm_orientationKey, pTherm_orientationVal);
        if(pTherm_orientationVal != null) {
            
            pTherm_orientation = new Integer();
            jsonToValue(pTherm_orientation, pTherm_orientationVal, L"Integer", L"Integer");
        }
        delete pTherm_orientationKey;
        JsonString* pTherm_relay_cmdKey = new JsonString(L"therm_relay_cmd");
        IJsonValue* pTherm_relay_cmdVal = null;
        pJsonObject->GetValue(pTherm_relay_cmdKey, pTherm_relay_cmdVal);
        if(pTherm_relay_cmdVal != null) {
            
            pTherm_relay_cmd = new Integer();
            jsonToValue(pTherm_relay_cmd, pTherm_relay_cmdVal, L"Integer", L"Integer");
        }
        delete pTherm_relay_cmdKey;
        JsonString* pBattery_vpKey = new JsonString(L"battery_vp");
        IJsonValue* pBattery_vpVal = null;
        pJsonObject->GetValue(pBattery_vpKey, pBattery_vpVal);
        if(pBattery_vpVal != null) {
            
            pBattery_vp = new Integer();
            jsonToValue(pBattery_vp, pBattery_vpVal, L"Integer", L"Integer");
        }
        delete pBattery_vpKey;
        JsonString* pRf_statusKey = new JsonString(L"rf_status");
        IJsonValue* pRf_statusVal = null;
        pJsonObject->GetValue(pRf_statusKey, pRf_statusVal);
        if(pRf_statusVal != null) {
            
            pRf_status = new Integer();
            jsonToValue(pRf_status, pRf_statusVal, L"Integer", L"Integer");
        }
        delete pRf_statusKey;
        JsonString* pPlug_connected_boilerKey = new JsonString(L"plug_connected_boiler");
        IJsonValue* pPlug_connected_boilerVal = null;
        pJsonObject->GetValue(pPlug_connected_boilerKey, pPlug_connected_boilerVal);
        if(pPlug_connected_boilerVal != null) {
            
            pPlug_connected_boiler = new Boolean(false);
            jsonToValue(pPlug_connected_boiler, pPlug_connected_boilerVal, L"Boolean", L"Boolean");
        }
        delete pPlug_connected_boilerKey;
        JsonString* pUdp_connKey = new JsonString(L"udp_conn");
        IJsonValue* pUdp_connVal = null;
        pJsonObject->GetValue(pUdp_connKey, pUdp_connVal);
        if(pUdp_connVal != null) {
            
            pUdp_conn = new Boolean(false);
            jsonToValue(pUdp_conn, pUdp_connVal, L"Boolean", L"Boolean");
        }
        delete pUdp_connKey;
        JsonString* pLast_therm_seenKey = new JsonString(L"last_therm_seen");
        IJsonValue* pLast_therm_seenVal = null;
        pJsonObject->GetValue(pLast_therm_seenKey, pLast_therm_seenVal);
        if(pLast_therm_seenVal != null) {
            
            pLast_therm_seen = new Integer();
            jsonToValue(pLast_therm_seen, pLast_therm_seenVal, L"Integer", L"Integer");
        }
        delete pLast_therm_seenKey;
        JsonString* pLast_plug_seenKey = new JsonString(L"last_plug_seen");
        IJsonValue* pLast_plug_seenVal = null;
        pJsonObject->GetValue(pLast_plug_seenKey, pLast_plug_seenVal);
        if(pLast_plug_seenVal != null) {
            
            pLast_plug_seen = new Integer();
            jsonToValue(pLast_plug_seen, pLast_plug_seenVal, L"Integer", L"Integer");
        }
        delete pLast_plug_seenKey;
        JsonString* pWifi_statusKey = new JsonString(L"wifi_status");
        IJsonValue* pWifi_statusVal = null;
        pJsonObject->GetValue(pWifi_statusKey, pWifi_statusVal);
        if(pWifi_statusVal != null) {
            
            pWifi_status = new Integer();
            jsonToValue(pWifi_status, pWifi_statusVal, L"Integer", L"Integer");
        }
        delete pWifi_statusKey;
        JsonString* pMeasuredKey = new JsonString(L"measured");
        IJsonValue* pMeasuredVal = null;
        pJsonObject->GetValue(pMeasuredKey, pMeasuredVal);
        if(pMeasuredVal != null) {
            
            pMeasured = new SamiNAThermMeasure();
            jsonToValue(pMeasured, pMeasuredVal, L"SamiNAThermMeasure", L"SamiNAThermMeasure");
        }
        delete pMeasuredKey;
        
    }
}
Exemple #30
0
void
SamiPet::fromJsonObject(IJsonValue* pJson) {
    JsonObject* pJsonObject = static_cast< JsonObject* >(pJson);

    if(pJsonObject != null) {
        JsonString* pIdKey = new JsonString(L"id");
        IJsonValue* pIdVal = null;
        pJsonObject->GetValue(pIdKey, pIdVal);
        if(pIdVal != null) {
            
            pId = new Long();
            jsonToValue(pId, pIdVal, L"Long", L"Long");
        }
        delete pIdKey;
        JsonString* pCategoryKey = new JsonString(L"category");
        IJsonValue* pCategoryVal = null;
        pJsonObject->GetValue(pCategoryKey, pCategoryVal);
        if(pCategoryVal != null) {
            
            pCategory = new SamiCategory();
            jsonToValue(pCategory, pCategoryVal, L"SamiCategory", L"SamiCategory");
        }
        delete pCategoryKey;
        JsonString* pNameKey = new JsonString(L"name");
        IJsonValue* pNameVal = null;
        pJsonObject->GetValue(pNameKey, pNameVal);
        if(pNameVal != null) {
            
            pName = new String();
            jsonToValue(pName, pNameVal, L"String", L"String");
        }
        delete pNameKey;
        JsonString* pPhotoUrlsKey = new JsonString(L"photoUrls");
        IJsonValue* pPhotoUrlsVal = null;
        pJsonObject->GetValue(pPhotoUrlsKey, pPhotoUrlsVal);
        if(pPhotoUrlsVal != null) {
            pPhotoUrls = new ArrayList();
            
            jsonToValue(pPhotoUrls, pPhotoUrlsVal, L"IList", L"String");
        }
        delete pPhotoUrlsKey;
        JsonString* pTagsKey = new JsonString(L"tags");
        IJsonValue* pTagsVal = null;
        pJsonObject->GetValue(pTagsKey, pTagsVal);
        if(pTagsVal != null) {
            pTags = new ArrayList();
            
            jsonToValue(pTags, pTagsVal, L"IList", L"SamiTag");
        }
        delete pTagsKey;
        JsonString* pStatusKey = new JsonString(L"status");
        IJsonValue* pStatusVal = null;
        pJsonObject->GetValue(pStatusKey, pStatusVal);
        if(pStatusVal != null) {
            
            pStatus = new String();
            jsonToValue(pStatus, pStatusVal, L"String", L"String");
        }
        delete pStatusKey;
        
    }
}