解析进入iPhone应用程序的结果的最佳方法

时间:2012-03-03 17:02:30

标签: objective-c

我们目前正在通过https帖子和回复向我们的iPhone应用程序收到重要的“结果”。它是一个重复的结构字符串,具有相同的16个“占位符”。我们目前正在使用一系列嵌套for循环在目标C中处理此结果。

我们看到的主要问题是:

1)自定义正在显示的文本的“外观”,例如粗体,字体,大小等几乎是不可能的。 2)嵌套(即使是非常具体的评论)也很混乱,我们看到一些重复的数据并且无法完全清理。

有没有更好的方法来定位我们正在构建的架构?我一直在阅读很多关于JSON的内容 - 这是我们应该尝试在后端而不是在目标c中尝试吗?

示例重复字符串:

*Active Coverage**Health Benefit Plan Coverage**Choice Fund HRA Open Access Plus***********Member is in network based on NPI ID provided in request*Co-Insurance*Individual*Health Benefit Plan Coverage^Acupuncture^Durable Medical Equipment Purchased^Home Health Care^Skilled Nursing Care***.2****In network*****Deductible*Individual*Health Benefit Plan Coverage****1500*****In network******Individual****Remaining*1500*****In network*****Loss)*Individual*Health Benefit Plan Coverage***Year*2500*****In network*****Out of Pocket (Stop Loss)*Individual*Health Benefit Plan*********In network*******Health Benefit Plan Coverage***Lifetime******In network*****Co-Insurance*Family******.2****In network*****Deductible*Family*Health Benefit Plan Coverage***Calendar Year*4500*****In network*****Deductible*Family*Coverage***Remaining*4500*****In network*****Out of Pocket (Stop Loss)*Family*Health Benefit Plan Coverage***Calendar Year*7500*****In network*****Out of Pocket (Stop Loss)*Family*Health Benefit Plan Coverage***Remaining*7500*****In network*****Co-Insurance**Health Benefit Plan Coverage^Acupuncture^Durable Medical Equipment Purchased^Home Health Care^Immunizations^Transplants^Well Baby Care^Skilled Nursing Care*****.4****Out of network*****Deductible*Individual*Health Benefit Plan Coverage***Calendar Year*3000*****Out of network*****Deductible*Individual*Health Benefit Plan Coverage***Remaining*3000*****Out of network*****Out of Pocket (Stop Loss)*Individual*Health Benefit Plan Coverage***Calendar Year*5000*****Out of network*****Out of Pocket (Stop Loss)*Individual*Health Benefit Plan Coverage***Remaining*5000*****Out of network*****Unlimited*Individual*Health Benefit Plan Coverage***Lifetime******Out of network*****Co-Insurance*Family*Health Benefit Plan Coverage*****.4****Out of network*****Deductible*Family*Health Benefit Plan Coverage***Calendar Year*9000*****Out of network*****Deductible*Family*Health Benefit Plan Coverage***Remaining*9000*****Out of network*****Out of Pocket (Stop Loss)*Family*Health Benefit Plan Coverage***Calendar Year*15000*****Out of network*****Out of Pocket (Stop Loss)*Family*Health Benefit Plan Coverage***Remaining*15000*****Out of network*****Limitations*Individual*Acupuncture***Episode***Visits*15**In network*****Limitations*Individual*Acupuncture***Episode***Visits*15**Out of network*****Unlimited*Individual*Durable Medical Equipment Purchased^Skilled Nursing Care***Calendar Year******In network*****Unlimited*Individual*Durable Medical Equipment Purchased^Skilled Nursing Care***Calendar Year******Out of network*****Co-Insurance*Individual*Prosthetic Device*****.2****In network****External Prosthetic Appliances*Deductible*Individual*Prosthetic Device***Calendar Year*0*****In network****External Prosthetic Appliances*Unlimited*Individual*Prosthetic Device***Calendar Year******In network****External Prosthetic Appliances*Co-Insurance*Individual*Prosthetic Device*****.4****Out of network****External Prosthetic Appliances*Deductible*Individual*Prosthetic Device***Calendar Year*0*****Out of network****External Prosthetic Appliances*Unlimited*Individual*Prosthetic Device***Calendar Year******Out of network****External Prosthetic Appliances*Co-Insurance*Individual*Family Planning*****.2****In network****Genetic Testing*Unlimited*Individual*Family Planning***Calendar Year******In network****Genetic Testing*Co-Insurance*Individual*Family Planning*****.4****Out of network****Genetic Testing*Unlimited*Individual*Family Planning***Calendar Year******Out of network****Genetic Testing*Limitations*Individual*Home Health Care***Calendar Year***Days*120**In network*****Limitations*Individual*Home Health Care***Calendar Year***Days*120**Out of network*****Co-Insurance*Individual*Prosthetic Device*****0*Age, High Value*17**In network****Hearing Aid*Co-Insurance*Individual*Prosthetic Device*****0*Age, High Value*17**Out of network****Hearing Aid*Co-Insurance*Individual*Immunizations^Well Baby Care*****0****In network*****Co-Insurance*Individual*MRI Scan*****.2****In network*****Co-Payment*Individual*MRI Scan***Episode*0*****In network*****Deductible*Individual*MRI Scan***Episode*0*****Out of network*****Co-Insurance*Individual*Routine Physical*****0****In network****Adult Preventative Care*Co-Insurance*Individual*Routine Physical*****.4****Out of network****Adult Preventative Care*Co-Insurance*Individual*Rehabilitation*****.2****In network****All Therapies*Unlimited*Individual*Rehabilitation***Calendar Year******In network****All Therapies*Co-Insurance*Individual*Rehabilitation*****.4****Out of network****All Therapies*Unlimited*Individual*Rehabilitation***Calendar Year******Out of network****All Therapies*Co-Insurance*Individual*Consultation*****.2****In network****Specialist Services*Co-Insurance*Individual*Prosthetic Device*****.2****In network****Wig*Limitations*Individual*Prosthetic Device***Years*1000*****In network****Wig*Co-Insurance*Individual*Prosthetic Device*****.2****Out of network****Wig*Limitations*Individual*Prosthetic Device***Years*1000*****Out of network****Wig*Contact Following Entity for Eligibility or Benefit Information*Individual*Pharmacy**Medco************Limitations*Individual*Infertility***Lifetime*15000*****In network****Visits, DX-treatment - incl drugs, IV, GIFT, ZIFT*Limitations*Individual*Infertility***Lifetime*15000*****Out of network****Visits, DX-treatment - incl drugs, IV, GIFT, ZIFT*Active Coverage**Medical Care*************PHS+*Active Coverage**Chiropractic^Hospitalization^Hospital - Inpatient^Hospital - Outpatient^Emergency Services^Professional (Physician) Visit - Office^Urgent Care**************Co-Insurance*Individual*Chiropractic*****.2****In network****Specialist*Limitations*Individual*Chiropractic***Calendar Year***Visits*20**In network****Specialist*Co-Insurance*Individual*Chiropractic*****.2****In network****PCP*Limitations*Individual*Chiropractic***Calendar Year***Visits*20**In network****PCP*Co-Insurance*Individual*Chiropractic*****.4****Out of network****Specialist*Limitations*Individual*Chiropractic***Calendar Year***Visits*20**Out of network****Specialist*Co-Insurance*Individual*Chiropractic*****.4****Out of network****PCP*Limitations*Individual*Chiropractic***Calendar Year***Visits*20**Out of network****PCP*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****Specialist services*Coverage Basis*Individual*Hospital - Inpatient^Hospital - Outpatient********In network*In network*****Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****ICU related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****ICU related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****Private room related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****Private room related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****Semi private room related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****Semi private room related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****Other hospital extras related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****Other hospital extras related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.2****In network****PCP services*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****Specialist services*Coverage Basis*Individual*Hospital - Inpatient^Hospital - Outpatient********In network*Out of network*****Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****ICU related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****ICU related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****Private room related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****Private room related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****Semi private room related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****Semi private room related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****Other hospital extras related to an injury*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****Other hospital extras related to an illness*Co-Insurance*Individual*Hospital - Inpatient*****.4****Out of network****PCP services*Co-Insurance*Individual*Hospital - Outpatient*****.2****In network****Other outpt facility svcs related to an injury*Co-Insurance*Individual*Hospital - Outpatient*****.2****In network****Other outpt facility svcs related to an illness*Co-Insurance*Individual*Hospital - Outpatient^Emergency Services^Urgent Care*****.2****In network****Related to an injury*Co-Insurance*Individual*Hospital - Outpatient^Emergency Services^Urgent Care*****.2****In network****Related to an illness*Co-Insurance*Individual*Hospital - Outpatient*****.4****Out of network****Other outpt facility svcs related to an injury*Co-Insurance*Individual*Hospital - Outpatient*****.4****Out of network****Other outpt facility svcs related to an illness*Co-Insurance*Individual*Hospital - Outpatient*****.4****Out of network****Related to an injury*Co-Insurance*Individual*Hospital - Outpatient*****.4****Out of network****Related to an illness*Co-Insurance*Individual*Emergency Services^Professional (Physician) Visit - Office*****.2****In network****PCP related to an injury*Co-Insurance*Individual*Emergency Services^Professional (Physician) Visit - Office*****.2****In network****PCP related to an illness*Co-Insurance*Individual*Emergency Services*****.2****In network****Professional services related to an injury*Co-Insurance*Individual*Emergency Services*****.2****In network****Professional services related to an illness*Co-Insurance*Individual*Emergency Services^Professional (Physician) Visit - Office*****.4****Out of network****PCP related to an injury*Co-Insurance*Individual*Emergency Services^Professional (Physician) Visit - Office*****.4****Out of network****PCP related to an illness*Co-Insurance*Individual*Emergency Services*****.4****Out of network****Professional services related to an injury*Co-Insurance*Individual*Emergency Services*****.4****Out of network****Professional services related to an illness*Co-Insurance*Individual*Emergency Services^Urgent Care*****.2****Out of network****Related to an illness*Deductible*Individual*Emergency Services***Calendar Year*1500*****Out of network****Related to an illness*Deductible*Family*Emergency Services***Calendar Year*4500*****Out of network****Related to an illness*Out of Pocket (Stop Loss)*Individual*Emergency Services***Calendar Year*2500*****Out of network****Related to an illness*Co-Insurance*Individual*Emergency Services^Urgent Care*****.2****Out of network****Related to an injury*Deductible*Individual*Emergency Services***Calendar Year*1500*****Out of network****Related to an injury*Deductible*Family*Emergency Services***Calendar Year*4500*****Out of network****Related to an injury*Out of Pocket (Stop Loss)*Individual*Emergency Services***Calendar Year*2500*****Out of network****Related to an injury*Co-Insurance*Individual*Professional (Physician) Visit - Office*****.2****In network****OBGYN*Co-Insurance*Individual*Professional (Physician) Visit - Office*****.2****In network****Specialist related to an injury*Co-Insurance*Individual*Professional (Physician) Visit - Office*****.2****In network****Specialist related to an illness*Co-Insurance*Individual*Professional (Physician) Visit - Office*****.4****Out of network****OBGYN*Co-Insurance*Individual*Professional (Physician) Visit - Office*****.4****Out of network****Specialist related to an injury*Co-Insurance*Individual*Professional (Physician) Visit - Office*****.4****Out of network****Specialist related to an illness*Deductible*Individual*Urgent Care***Calendar Year*1500*****Out of network*****Deductible*Family*Urgent Care***Calendar Year*4500*****Out of network*****Out of Pocket (Stop Loss)*Individual*Urgent Care***Calendar Year*2500*****Out of network*****Active Coverage**Health Benefit Plan Coverage**CareLink************Active Coverage**Mental Health**Open Access Plus************Limitations*Individual*Health Benefit Plan Coverage***Remaining*751*********HRA BALANCE

1 个答案:

答案 0 :(得分:1)

你一定要看看JSON。 http://en.m.wikipedia.org/wiki/JSON 当您无法控制数据源时,您可以在源和应用程序之间构建一个额外的层。在此图层中,您可以将此数据转换为JSON。