char * CCJSONConverter::strFrom(CCDictionary *dictionary)
{
    CCAssert(dictionary, "CCJSONConverter:can not convert a null pointer");
    cJSON * json = cJSON_CreateObject();
    convertDictionaryToJson(dictionary, json);
    return cJSON_Print(json);
}
Exemple #2
0
char * CCJSONConverter::strFrom(__Dictionary *Dictionary)
{
    CCAssert(Dictionary, "CCJSONConverter:can not convert a null pointer");
    cJSON * json = cJSON_CreateObject();
    convertDictionaryToJson(Dictionary, json);
    char* returnStr = cJSON_PrintUnformatted(json);
    cJSON_Delete(json);
    return returnStr;
}