2012-03-03 7 views
0

私たちは現在、httpsの投稿と応答を介して私たちのiPhoneアプリケーションに大きな影響を与えています。それは同じ16 "プレースホルダー"を持つ反復構造体ストリングです。私たちは現在、目的のCで一連の入れ子になったforループを使ってこの結果を処理しています。私たちはこれを見ているiPhoneアプリケーションへの結果を解析する最善の方法

主要な問題:

1)テキストの「見た目」は、このような大胆な、フォントとして表示されているカスタマイズ、サイズなどはほぼ不可能です。 2)ネスティング(非常に具体的なコメントであっても)は面倒です。私たちはいくつかのデータの繰り返しを見ており、完全にはきれいにできませんでした。

私たちが構築しているもののアーキテクチャを位置づける良い方法はありますか?私はJSONについて多くのことを読んできました。これは、客観的なCではなく、バックエンドでpasringを試してみるべきですか?

例繰り返し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
+1

"サンプルテキスト"はすべて乱されていて、役に立たないでしょう。形式についての説明を与えてください(例えば、 ' * 'なんか)。それでは、あなたの目標は何ですか?スピーディーな解析?それを分割する?あなたは本当に言わなかった。最後になりましたが、これはあなたが制御できるサービスからのものですか?つまり、フォーマットは固定ですか、それともそれに影響を与えることができますか? – DarkDust

+0

申し訳ありません、はい、繰り返し構造です。 variable1 * variable2 * variable3 * variable4 *(15個のプレースホルダーがあり、それらが繰り返されます) –

+0

目的:スピーディーな解析、断片化、出力のスタイル設定が可能です。 –

答えて

1

あなたは間違いなく、JSONを見ている必要があります。 http://en.m.wikipedia.org/wiki/JSON データソースを制御できないときは、ソースとアプリケーションの間に余分なレイヤーを構築することができます。このレイヤーでは、このデータをJSONに変換できます。

+0

オリジナルデータをJSONインアプリに変換する際のポイントは何ですか?追加のオーバーヘッドが発生しているだけです。 – DarkDust

+0

このアプリは停止していますこれはWebサービスで行うことができます。次に、デバイスに転送するデータ量が大幅に減ります。 – FrediWeber

+1

私はそれを取得しません。あなたは、WebサービスAの出力を解析し、WebサービスBによって変換して、アプリケーションCが解析できるようにしますか?複雑さ、待ち時間、障害の箇所を追加することになります。 – DarkDust

関連する問題