diff --git a/common/src/interfaces/characteristic_profile.cpp b/common/src/interfaces/characteristic_profile.cpp index 4cb9ca65..7d282f13 100644 --- a/common/src/interfaces/characteristic_profile.cpp +++ b/common/src/interfaces/characteristic_profile.cpp @@ -130,7 +130,7 @@ std::string CharacteristicProfile::dump() const cJSON_AddStringToObject(json, SERVICE_NAME.c_str(), serviceName_.c_str()); cJSON_AddStringToObject(json, CHARACTERISTIC_KEY.c_str(), characteristicKey_.c_str()); cJSON_AddBoolToObject(json, IS_MULTI_USER.c_str(), isMultiUser_); - cJSON_AddNumberToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_)); + cJSON_AddStringToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_).c_str()); if (characteristicKey_ == SWITCH_STATUS) { cJSON_AddStringToObject(json, CHARACTERISTIC_VALUE.c_str(), characteristicValue_.c_str()); } else { diff --git a/common/src/interfaces/device_profile.cpp b/common/src/interfaces/device_profile.cpp index c8ae4bbf..230cc12d 100644 --- a/common/src/interfaces/device_profile.cpp +++ b/common/src/interfaces/device_profile.cpp @@ -225,7 +225,7 @@ std::string DeviceProfile::dump() const cJSON_AddStringToObject(json, OS_VERSION.c_str(), osVersion_.c_str()); cJSON_AddNumberToObject(json, OS_TYPE.c_str(), osType_); cJSON_AddBoolToObject(json, IS_MULTI_USER.c_str(), isMultiUser_); - cJSON_AddNumberToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_)); + cJSON_AddStringToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_).c_str()); char* jsonChars = cJSON_PrintUnformatted(json); if (jsonChars == NULL) { cJSON_Delete(json); @@ -262,7 +262,7 @@ std::string DeviceProfile::AnnoymizeDump() const cJSON_AddStringToObject(json, OS_TYPE.c_str(), ProfileUtils::GetAnonyString(std::to_string(osType_)).c_str()); cJSON_AddBoolToObject(json, IS_MULTI_USER.c_str(), isMultiUser_); - cJSON_AddNumberToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_)); + cJSON_AddStringToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_).c_str()); char* jsonChars = cJSON_PrintUnformatted(json); if (jsonChars == NULL) { cJSON_Delete(json); diff --git a/common/src/interfaces/service_profile.cpp b/common/src/interfaces/service_profile.cpp index eecb1faa..8f267a7e 100644 --- a/common/src/interfaces/service_profile.cpp +++ b/common/src/interfaces/service_profile.cpp @@ -136,7 +136,7 @@ std::string ServiceProfile::dump() const cJSON_AddStringToObject(json, SERVICE_NAME.c_str(), serviceName_.c_str()); cJSON_AddStringToObject(json, SERVICE_TYPE.c_str(), serviceType_.c_str()); cJSON_AddBoolToObject(json, IS_MULTI_USER.c_str(), isMultiUser_); - cJSON_AddNumberToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_)); + cJSON_AddStringToObject(json, USER_ID.c_str(), ProfileUtils::GetAnonyInt32(userId_).c_str()); char* jsonChars = cJSON_PrintUnformatted(json); if (jsonChars == NULL) { cJSON_Delete(json);