Giter Site home page Giter Site logo

NSSet转换失败了 about mjextension HOT 11 OPEN

codermjlee avatar codermjlee commented on May 11, 2024
NSSet转换失败了

from mjextension.

Comments (11)

zhengbomo avatar zhengbomo commented on May 11, 2024 1

杰哥,我们拿到服务器的JSON数据后如何快速定义属性,有没有可以直接吧Json转换为Model的工具(非运行时,代码转换)

from mjextension.

CoderMJLee avatar CoderMJLee commented on May 11, 2024

不能调为NSArray么?NSSet是无须的哦,应该满足不了一般的需求吧?像显示在表格上的数据都是有序的哈

from mjextension.

yupliang avatar yupliang commented on May 11, 2024

杰哥,我是个coredata新手啊,不知core data怎么生成nsarray的属性呢?

from mjextension.

100mango avatar 100mango commented on May 11, 2024

你可以通过fetchRequest来获取entity的数组

NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];

NSEntityDescription *entity = [NSEntityDescription entityForName:@"yourEntityName" inManagedObjectContext:self.managedObjectContext];
[fetchRequest setEntity:entity];

NSError *error = nil;
NSArray *result = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error];

from mjextension.

CoderMJLee avatar CoderMJLee commented on May 11, 2024

暂时没发现有这样的工具哈。我看看可以考虑以后做个Xcode插件,哈哈。

from mjextension.

zhengbomo avatar zhengbomo commented on May 11, 2024

在C#和JAVA上就有很方便的转换工具,不用自己一个一个敲

from mjextension.

CoderMJLee avatar CoderMJLee commented on May 11, 2024

也可以自己写个OC程序去转换:字符串解析和字符串写入操作

from mjextension.

zhengbomo avatar zhengbomo commented on May 11, 2024

恩,只是自己太懒了,有空试写一下

from mjextension.

ValiantCat avatar ValiantCat commented on May 11, 2024

在CoreData 里面经常会使用到Set 发现在配合CoreData使用时非常麻烦 必须苹果建议所有的关系都要inverse 无法满足需求

from mjextension.

chengleyi avatar chengleyi commented on May 11, 2024

杰哥求支持NSSet 55555555555

from mjextension.

ATMLGG avatar ATMLGG commented on May 11, 2024

杰哥,我们拿到服务器的JSON数据后如何快速定义属性,有没有可以直接吧Json转换为Model的工具(非运行时,代码转换)

这个网上很多,自己动手搜一下就有

from mjextension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.