We are currently receiving a heavy duty “result” into our iPhone application via https post and response. It is a repetitive structure string with the same 16 “placeholders”. We are currently processing this result in objective C with a series of nested for loops.
Major problems we are seeing with this:
1) Customizing the “look” of text being displayed such as bold, fonts, size etc is nearly impossible.
2) Nesting (even with very specific commenting) is messy and we are seeing some repeats of data and have not been able to fully clean.
Is there a better way to situate the architecture of what we are building? I’ve been reading a lot about JSON – is this something we should try out pasring on back end instead of in objective c?
EXAMPLE REPETITIVE STRING:
*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
You should definitely have a look at JSON. http://en.m.wikipedia.org/wiki/JSON
When you can’t controll the data source you could build an extra layer between the source and the app. In this layer you could convert this data into JSON.