1

好吧,我确实添加了 JSONKit 类(JSONKit.h 和 JSONKit.h),但是在 .m 文件中,我有很多警告和编译错误,例如:

NSError *error;  //--> ARC forbids Objetive-C in structs or unions

or 

id key, object; whit the same error

anObject = [anObject retain]; //---> ARC forbids explicit message send 'retain''

or many error's in this part code:

static void _JKArrayInsertObjectAtIndex(JKArray *array, id newObject, NSUInteger objectIndex) {
  NSCParameterAssert((array != NULL) && (array->objects != NULL) && (array->count <= array->capacity) && (objectIndex <= array->count) && (newObject != NULL));
  if(!((array != NULL) && (array->objects != NULL) && (objectIndex <= array->count) && (newObject != NULL))) { [newObject autorelease]; return; }
  if((array->count + 1UL) >= array->capacity) {
    id *newObjects = NULL;
    if((newObjects = (id *)realloc(array->objects, sizeof(id) * (array->capacity + 16UL))) == NULL) { [NSException raise:NSMallocException format:@"Unable to resize objects array."]; }
    array->objects = newObjects;
    array->capacity += 16UL;
    memset(&array->objects[array->count], 0, sizeof(id) * (array->capacity - array->count));
  }
  array->count++;
  if((objectIndex + 1UL) < array->count) { memmove(&array->objects[objectIndex + 1UL], &array->objects[objectIndex], sizeof(id) * ((array->count - 1UL) - objectIndex)); array->objects[objectIndex] = NULL; }
  array->objects[objectIndex] = newObject;
}

如何以最佳方式使用适用于 xcode 4.6 iOS 6 的 JSONKit 和 JSON 框架?

& 多谢!!!来自玻利维亚的问候!!摇滚吧!!!XD

4

2 回答 2

2

尝试使用 JSONKit 的另一个分支。通过简单的搜索,我找到了一些可以纠正这个问题的叉子。

也许这个: https ://github.com/Kelp404/JSONKit/network

原 JSONKit的最后一次提交在这一天长达 8 个月......这很糟糕

于 2013-03-07T14:57:22.413 回答
1

对于任何感兴趣的人,我只是分叉了原始存储库并添加了看起来适用于 iOS6 的修复程序(和一个 Podspec 文件)。https://github.com/JoistApp/JSONKit

于 2013-10-10T15:41:44.463 回答