[iPhone]你将如何为下面给出的结构设计核心数据对象模型
Posted
技术标签:
【中文标题】[iPhone]你将如何为下面给出的结构设计核心数据对象模型【英文标题】:[iPhone]How would you design Core Data Object Model for the given below structure 【发布时间】:2010-07-23 19:02:32 【问题描述】: JSON作为字典 标题 = ( backGroundImageUrl = ""; 数据字段 = 名称; headerText = 名称; id = 名称; itemRenderer = ""; 工具提示 = ""; 宽度 = 60; , backGroundImageUrl = ""; 数据字段 = 出价; headerText = 出价; id = 出价; itemRenderer = ""; toolTip = "买入价"; 宽度 = 30; , backGroundImageUrl = ""; 数据字段 = 询价; headerText = 询问; id = 询价; itemRenderer = ""; toolTip = "要价"; 宽度 = 30; , backGroundImageUrl = ""; 数据字段 = PriceChg; headerText = Chg; id = PriceChg; itemRenderer = ""; toolTip = "价格变化"; 宽度 = 30; , backGroundImageUrl = ""; 数据字段 = SSPAsk; headerText = SSP; id = SSPAsk; itemRenderer = ""; toolTip = "剥离点差报价"; 宽度 = 30; , backGroundImageUrl = ""; 数据字段 = SSPChgDay; headerText = Chg; id = SSPChgDay; itemRenderer = ""; toolTip = "剥离点差变化"; 宽度 = 30; , backGroundImageUrl = ""; 数据字段 = PECSAsk; headerText = PECS; id = PECSAsk; itemRenderer = ""; toolTip = "面值等价 CDS 询价"; 宽度=“30”; , backGroundImageUrl = ""; 数据字段=PECSchg; headerText = Chg; id = PECSchg; itemRenderer = ""; toolTip = "面值等价 CDS 询价"; 宽度=“30”; , backGroundImageUrl = ""; 数据字段 = SOLAsk; headerText = ZSpd; id = SOLAsk; itemRenderer = ""; toolTip = "SOL 询问"; 宽度 = 30; , backGroundImageUrl = ""; 数据字段 = YTMAsk; headerText = YTM; id = YTMAsk; itemRenderer = ""; toolTip = "到期收益率"; 宽度 = 30; ); 值 = ( assetCellValueLst = AskColorCode = "#B8D1ED"; AskPrice = "102.20"; BidColorCode = "#B8D1ED"; 出价 = "102.00"; 名称 = "AR Bonar 11"; PECSAsk = 569; PECSchg = "(31)"; PECSchgColorCode = "#000000"; PriceChg = "0.00"; PriceChgColorCode = "#000000"; SOLAsk = 604; SSPAsk = 677; SSPChgDay = "+3"; SSPChgDayColorCode = "#000000"; YTMAsk = "6.97"; 资产组名 = 阿根廷; 资产 ID = ARBONAR11; iconPath = "图像/flag_Argentina.gif"; 更新=假; ; 资产 ID = ARBONAR11; , assetCellValueLst = AskColorCode = "#53840f"; AskPrice = "84.00"; BidColorCode = "#53840f"; 出价 = "83.75"; 名称 =“AR 身体 15”; PECSAsk = 945; PECSchg = 14; PECSchgColorCode = "#000000"; PriceChg = "-0.10"; PriceChgColorCode = "#53840F"; SOLAsk = 985; SSPAsk = 1007; SSPChgDay = "+7"; SSPChgDayColorCode = "#000000"; YTMAsk = "11.74"; 资产组名 = 阿根廷; 资产 ID = ARBON15; iconPath = "图像/flag_Argentina.gif"; 更新=假; ; 资产 ID = ARBON15; );【问题讨论】:
你想让人们阅读这个 json 吗?你为什么不只列出字典中的字段.. 重复***.com/questions/3322191/… 【参考方案1】:看起来您有两个表,其中包含一些明显的字段名称和类型。你有什么问题?
【讨论】:
我在初始化 NSDictionary 内部值时遇到问题。如果我有一个值:NSManagedObject 类。由于里面的字典可以根据用户偏好进行更改,即assetCellValueLst 字典可以有某些键或者它可能根本没有它们。 @Daniel 抱歉刚刚以更好的格式发布了它以上是关于[iPhone]你将如何为下面给出的结构设计核心数据对象模型的主要内容,如果未能解决你的问题,请参考以下文章