Click here to Skip to main content
14,830,769 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi I have one CSV table and I converted that table to JSON by using CSV to JSN converter. But i am =unable to use the samein my code it is showing error.mplease resolve my issue

What I have tried:

I am giving my JAVA code and also an XML code here

JAVA code:-



package com.example.administrator.emergencyhealthcare;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
* Created by Administrator on 4/26/2016.
*/
public class ParseJsonAndroidExample extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_parse_json_android_example);

final TextView output = (TextView) findViewById(R.id.output);
final Button bparsejson = (Button) findViewById(R.id.bparsejson);
final String strJson ="{"hospitals":[
{
"Name,Latitude,Longitude,Ambulance,Number": "Motherhood ,12.978289,77.637149,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Chinmaya Mission ,12.9777845,77.6464318,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sir CV Raman General Hospital ,12.9829148,77.6450036,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Axon Speciality Hospital ,12.9737876,77.6461477,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr. Bhargavi Reddy Women & Children Hospital ,12.9754727,77.6471159,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "G.G. Hospital ,12.9730098,77.6412486,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "ESI Hospital ,12.9711857,77.6367389,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Nethradhama Superspeciality Eye Hospital ,12.97344,77.635628,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Navashakthi Nethralaya ,12.975048,77.6363416,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Rashmi Hospital ,12.976795,77.636293,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr Rao Specialist Medical Center ,12.987432,77.620286,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Lakeside Medical Centre & Hospital ,12.9878366,77.6176994,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Manjushree Speciality Hospital ,12.982688,77.612561,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Guru Ramads Hospital ,12.9753725,77.6218735,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sai Baba Hospital ,12.9697839,77.6316795,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sadhana Eye Hospital ,12.9699504,77.6308777,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "ESI ,12.9705384,77.6274796,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Ulsoor Refferal Hospital ,12.9716158,77.6275939,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Syamala Hospital Research Centre ,12.971518,77.6275277,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Belle Vue's Cambridge Hospital ,12.9719652,77.6269519,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr.Parthasarathi’s Asian Hair and Skin Hospitals Bangalore ,12.969948,77.609666,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr.Parthasarathi’s Asian Hair and Skin Hospitals Bangalore ,12.969948,77.609666,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr M.G.Bhat / Laparoscopy Surgeons Bangalore ,12.968594,77.601649,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Bangalore Fetal Medicine Centre ,12.965762,77.6001179,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "A TO Z POLYCLINIC & BANGALORE CANCER CLINIC - RICHMOND ROAD,12.964689,77.597116,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Enhanced Health Care ,12.9653521,77.6381841,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Air Force Hospital ,12.9638727,77.6307879,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Clinic ,12.9654942,77.6416989,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Lohitha Hospital ,12.9639684,77.6430862,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Ayurvaid Hospital ,12.959582,77.6314867,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Asha Hospital ,12.9629186,77.6411332,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr NM Thimmarayappa Hospital ,12.9629435,77.6413921,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "AyurVAID Hospitals ,12.9551527,77.6427425,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sannati Speciality Hospital ,12.9555489,77.6417474,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cessna Lifeline Veterinary Hospital ,12.9564609,77.6426175,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Akshatha Skin & Child Care Centre ,12.9341319,77.6292551,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kamakshi Hospital ,12.9328248,77.6286542,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Hcg Hospital Koramangala ,12.9342391,77.6228694,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Spectra Hospitals ,12.9337407,77.6202328,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr. Subodh M. Shetty ,12.9388295,77.6235027,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "ACURA Speciality Hospital ,12.9352782,77.6205318,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Devi Eye Hospital ,12.9411939,77.6239963,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Marvel Hospital ,12.9264778,77.6374509,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Devi Hospital ,12.9239136,77.6198406,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vaatsalya Healthcare Solution Private Limited ,12.9258062,77.6180144,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kaveri Speciality Hospital ,12.923887,77.619282,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Chamundi Hospital ,12.9240704,77.6177795,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Life Care Hospital ,12.919467,77.612933,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "BBMP Hospital ,12.9216419,77.6102238,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Varalakshmi Hospital ,12.9248048,77.6173715,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "BBMP Madiwala Hospital ,12.9255347,77.6172497,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Venkateshwara Hospital ,12.9264148,77.616654,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kerala Lines ,12.926628,77.616622,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kottakkal Arya Vaidya Sala ,12.927316,77.616158,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "City Clinic ,12.9273337,77.6159996,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Spurthy Hospital ,12.923814,77.611325,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Karanth Speciality Hospital ,12.9160085,77.6193119,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Gangothri Hospital ,12.9163825,77.613754,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Multispeciality Hospital ,12.9148994,77.6126614,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Venkateshwara Hospital ,12.915139,77.610204,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kareem ENT ,12.9187772,77.6059078,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Life Care Hospital ,12.919467,77.612933,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vinayaka Nethralaya ,12.916505,77.603322,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Sairam Hospital ,12.914407,77.6002502,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Likhith Orthopedic Specialities And Diagnostics ,12.9196961,77.6139987,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shekhar Hospital Jayanagar ,12.9175513,77.5948498,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr Malathi Manipal Hospital ,12.9172099,77.5919161,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Reddy Hospital ,12.9204163,77.597153,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Mamatha Hospital ,12.920466,77.592335,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sagar Hospitals ,12.9280031,77.599599,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sunayana Eye Hospital ,12.9258403,77.5937017,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Jayanagar Orthopaedic Centre ,12.9293488,77.5877581,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "ESI Hospital ,12.9279936,77.5893638,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Krishna Sevashrama Hospital ,12.9173221,77.5851119,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Cradle ,12.9168403,77.58536,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shekar Nethralaya ,12.9065056,77.5959396,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Divakars Speciality Hospital ,12.9101798,77.5924578,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Chirag Hospital ,12.9125524,77.5914758,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Rajalakshmi Multi Specialty Hospital ,12.916767,77.579426,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Rajshekar Hospital ,12.9110121,77.5798316,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Panchakarma Ayurveda Hospital ,12.910491,77.5857168,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cadabams Hospitals ,12.906146,77.587004,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Green City Hospital ,12.9057038,77.5851799,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cloudnine Fertility - J P Nagar ,12.905461,77.585952,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Supra South City Hospital ,12.8919724,77.5790727,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sagar Hospitals ,12.9280031,77.599599,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Ramdev Medical ,12.983471,77.766457,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Sathya Sai General Hospital ,12.9734582,77.7510796,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cloudnine Clinic - Whitefield ,12.9753874,77.7510377,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shri Satya Sai Super Speciality hospital ,12.9811141,77.7294583,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "New Life Hospital ,12.997096,77.761185,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Narayana Multispeciality Hospital in Whitefield ,12.9894021,77.7336467,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cloudnine Hospital ,12.9877869,77.7319806,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Telerad RxDx – Healthcare PVT Ltd ,13.00021,77.757532,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Little Blossom Woman & Child clinic ,13.0047759,77.7569979,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "telerad rxdx healthcare ,13.0019927,77.7571606,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Narayana Multispeciality Hospital,12.9903753,77.7336741,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shri Satya Sai Super Speciality hospital ,12.9811141,77.7294583,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "MBS Holistic Clinic ,12.9839031,77.743957,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Bangalore Institute of Movement Research and Analysis ,12.9784876,77.7492195,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Employees State Insurance Dispensary ,12.968733,77.749867,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Hair Transplant Clinic in Bangalore ,12.9566413,77.7441715,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Columbia Asia Hospital - Whitefield ,12.958162,77.7452519,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Pushpa Nursing Home ,12.96888,77.749534,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Sathya Sai General Hospital ,12.9734582,77.7510796,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cloudnine Clinic - Whitefield ,12.9753874,77.7510377,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Columbia Asia Hospital - Whitefield ,12.958162,77.7452519,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Sathya Sai General Hospital ,12.9734582,77.7510796,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cloudnine Clinic- AECS ,12.964263,77.712561,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Aayug Multi Specialty Hospital ,12.965269,77.715177,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Cradle ,12.966677,77.717245,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Brookfield Hospital ,12.9669655,77.7170485,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vydehi Hospital Bus Stop ,12.9763495,77.7269438,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shri Satya Sai Super Speciality hospital ,12.9811141,77.7294583,Y,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cloudnine Hospital ,12.9877869,77.7319806,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Narayana Multispeciality Hospital,12.9903753,77.7336741,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "MGA Hospital ,12.9567869,77.7002104,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Jeevika Hospital ,12.9534862,77.7002963,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vims Dental Zone ,12.94833,77.699553,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "FamilyCare Homeopathy MultiSpeciality Homeopathy Clinic ,12.952413,77.706329,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "New Akshay Mallya Hospital ,12.956811,77.69901,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Yashomati Hospitals ,12.9557193,77.7112569,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "VIMS Super Specialty Hospital ,12.9483309,77.6995539,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sankara Eye Hospital ,12.957132,77.7128362,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Karunashraya ,12.95772,77.7133508,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Genesis Hospital ,12.9866449,77.5978304,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Narayana Multispeciality Hospital,12.9903753,77.7336741,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "RECOUP NeuroMusculoskeletal Rehabilitation Centre ,12.9926011,77.7027637,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Cradle ,12.966677,77.717245,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Town Hospital Sarjapur ,12.8603253,77.7932798,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Janani Hospital ,12.8613484,77.7829993,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Punarjani Ayurveda Hospital ,12.8965211,77.6948606,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Stanford Speciality Hospital ,12.9115004,77.676394,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Clinic - Sarjapur Road,12.9126581,77.6798154,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr. Levine Memorial Hospital ,12.9187968,77.6701373,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Nelivigi Eye Hospital and Surgical Centre ,12.924276,77.67386,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Motherhood Hospital ,12.9178788,77.6722908,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "St Johns Hospital Bus Stop ,12.9297273,77.6155544,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Motherhood ,12.978289,77.637149,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sakra World Hospital ,12.932125,77.685264,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Clinic - Bellandur,12.9263665,77.6768156,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Nelivigi Eye Hospital and Surgical Centre ,12.924276,77.67386,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "The Eye Foundation ,12.9234894,77.6724172,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Curo Live ,12.922807,77.673232,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Department of Physiotherapy ,12.9186713,77.6707086,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr. Levine Memorial Hospital ,12.9187968,77.6701373,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "The Sure Foundation Medical Centre ,12.923319,77.669477,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr. Levine Memorial Hospital ,12.9187968,77.6701373,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sakra World Hospital ,12.932125,77.685264,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Department of Physiotherapy ,12.9186713,77.6706228,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Curo Live ,12.922807,77.673232,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "The Sure Foundation Medical Centre ,12.923319,77.669477,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "The Eye Foundation ,12.9234894,77.6724172,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Nelivigi Eye Hospital and Surgical Centre ,12.924276,77.67386,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Clinic - Bellandur,12.9263665,77.6768156,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr. Sunny Medical Center ,12.9267782,77.6698181,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Axiss Dental Clinic ,12.9271249,77.6698433,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "BEML Hospital ,12.9712038,77.6653344,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Lotus Medical Center ,12.97345,77.678333,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sir CV Raman General Hospital ,12.9829148,77.6450036,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "CGHS W.c. No.10 ,12.9870489,77.661863,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Ace dental care C V Raman nagar ,12.9906344,77.6602949,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Venus Hospital ,12.9720395,77.6807521,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Priya Health Care ,12.9730186,77.6801663,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Comfort Multi Speciality Hospital ,12.981637,77.68006,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sree Lakshmi Hospital ,12.9821203,77.6803987,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Comfort Nursing Home ,12.9817733,77.6800276,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Lotus Medical Center ,12.97345,77.678333,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apple Clinic ,12.9730745,77.6767288,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "MediHope Super Speciality Hospital ,12.973572,77.675161,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "S S Labs ,12.9775231,77.679399,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Deepam Eye Clinic ,12.9850004,77.6754343,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "santhgiri Ayurveda & siddha hospital ,12.9838935,77.6787813,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sree Lakshmi Hospital ,12.9821203,77.6803987,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Comfort Hospital ,12.9811866,77.6792599,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Comfort Nursing Home ,12.9817733,77.6800276,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Comfort Multi Speciality Hospital ,12.981637,77.68006,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "BEML Hospital ,12.9712038,77.6653344,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Keva Ayurveda New Thippasandra Branch ,12.9746768,77.6540843,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shreyas Clinic and Diagnostic Centre ,12.9698628,77.6499994,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Praveen Baliga ,12.970831,77.6490794,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Women and Children Hospital ,12.9726115,77.6486366,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "G.G. Hospital ,12.9730098,77.6412486,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Axon Speciality Hospital ,12.9737876,77.6461477,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr. Bhargavi Reddy Women & Children Hospital ,12.9754727,77.6471159,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Chinmaya Narayana Superspeciality Centre,12.9795095,77.6462871,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "M S Medical Centre ,12.9808161,77.6459782,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "MGA Hospital ,12.9567869,77.7002104,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Yashomati Hospitals ,12.9557193,77.7112569,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Karunashraya ,12.95772,77.7133508,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sankara Eye Hospital ,12.957132,77.7128362,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Columbia Asia Hospital - Whitefield ,12.958162,77.7452519,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Femiint Health - Whitefield ,12.958913,77.746587,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kulkarni Hospital ,12.9401731,77.7468994,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Varthur Government Hospital ,12.9374806,77.746532,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "The Dr's Hospital ,12.941333,77.746983,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Lakshmi Nursing Home ,12.941183,77.746152,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Rotary Eye Hospital ,12.9817723,77.5548763,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sidvin Hospital Pvt Ltd. ,12.9821493,77.549348,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Nayak Hospital ,12.9993407,77.5610126,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Ananya Hospital ,12.999758,77.550509,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Citi Hospital ,12.9956354,77.5509758,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vasan Eye Care ,12.9994436,77.5504404,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Fortis Hospital ,13.002245,77.549041,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Tamara Hospital & IVF Centre ,13.0043304,77.5530569,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Diacon Hospital ,13.0039413,77.5499134,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "NU Hospitals (West) ,13.0119345,77.5528514,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sudharshana Nethralaya ,12.998011,77.5715111,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Jupiter Hospital ,12.9999782,77.5661944,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Leela Hospital ,13.000222,77.569479,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Narayana Super Speciality Hospitals ,13.0002586,77.5691038,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Lakshmi Maternity Home ,13.0019142,77.5713365,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Manipal Hospitals Outpatient Department ,13.0035818,77.5655326,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Manjunatha Maternity Home & Surgical Centre ,13.0059092,77.5698815,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Cloudnine Hospital - Malleshwaram ,13.0076945,77.5624922,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr Batra`s Super Speciality Clinic ,13.0081415,77.5648077,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vagus Hospital ,13.0085538,77.5689172,Y,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "JC Nagar Police Station ,13.0055552,77.5935133,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Snow City ,13.0062532,77.5919561,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Dr.Chethan Sulochana Hospital ,13.0062476,77.5930825,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Venkateshwara Clinic ,13.009067,77.595017,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "JC Nagar Municipal Hospital ,13.0099333,77.594322,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Sai Krupa Hospital ,13.0295015,77.5593677,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kala Hospital & Clinical Laboratory ,13.0223616,77.5587461,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Acharya Tulsi Jain Hospital ,13.021763,77.556835,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Raksha MultiSpeciality Hospital ,13.0198222,77.5418325,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Ravi Kirloskar Memorial Hospital ,13.038506,77.528168,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Mysore Hospital ,13.0274589,77.5397673,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "ESI Hospital ,13.024892,77.5310138,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sun Orthopaedic Hospital ,13.0332605,77.5549525,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sparsh Hospital ,13.0275155,77.5428692,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "PEOPLE TREE Hospitals ,13.0285451,77.5392616,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Government Hospital ,13.0005673,77.6746457,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shri Satya Sai Super Speciality hospital ,12.9811141,77.7294583,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Narayana Multispeciality Hospital,12.9903753,77.7336741,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "ESI Hospital ,13.0077784,77.6923603,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "N M P G Hospital ,13.006167,77.700483,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Ram Hospital ,13.0087325,77.6940081,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Patil Hospital ,13.0089581,77.6968773,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Deepa Hospital ,13.0120547,77.6998134,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "K R Puram Super Speciality Hospital ,13.0109889,77.6973394,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sathyasai Lakeside Orthopaedic Hospital ,13.0214405,77.7128439,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vinayaka Hospital ,12.9373788,77.5495668,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Excel Care Hospital ,12.9205003,77.5735391,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Udhbhava Hospital ,12.925905,77.5486909,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "D G Hospital ,12.920684,77.5599314,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sevakshetra Hospital ,12.921709,77.5720616,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Abhaya Eye Hospital ,12.9277157,77.54635,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "S G Hospital ,12.9275468,77.5458178,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Bangalore Nethralaya ,12.9264287,77.5648459,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Devagiri Hospital ,12.9240855,77.5658259,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Promed Hospital ,12.9294458,77.5640122,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Pooja Hospital ,12.9910447,77.454085,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "S.S.G. Hospital ,12.9853209,77.4847346,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Ashraya Hospitals ,12.9889724,77.5076986,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Gayathri Hospital ,12.9743135,77.5425206,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Lakshmi Multi Speciality Hospital ,12.988074,77.508677,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Madhu Hospital ,12.9814977,77.5343925,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Madhu Hospital ,12.9783086,77.5429418,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Survodaya Hospital ,12.9814977,77.5343925,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Abhinav Hospital ,12.975566,77.557389,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "ESI ,12.9741018,77.5625883,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Maruthi Hospital ,12.9676356,77.5413403,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Padmashree Nursing Home ,12.958253,77.535033,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "A.M. Hospital ,12.9599989,77.5315217,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sharavathi Hospitals ,12.962331,77.53422,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Gayathri Hospital ,12.9743135,77.5425206,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kamadhenu Hospital ,12.9755667,77.535013,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Shobha Hospital ,12.9755446,77.5314295,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vidya Eye Hospital ,12.970686,77.537687,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Saikrupa Hospital For Women & Surgical Centre ,12.969172,77.535395,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vijayanagar Global Hospital ,12.9717236,77.5373237,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sagar Chandramma Hospitals ,12.9485564,77.5747955,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "BMS Hospital ,12.941319,77.567699,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Balaji Multispeciality Hospital ,12.9376031,77.5666268,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Gunasheela Surgical And Maternity Hospital ,12.9401679,77.5765014,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Bangalore Hospital ,12.9377091,77.5804171,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "A.V. Hospital ,12.9388569,77.5785402,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Basavanagudi Medical Centre ,12.945344,77.579865,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "A V Hospital ,12.9451925,77.5782394,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Basavanagudi ENT Care Centre ,12.9459114,77.5754739,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Trinity Hospital and Heart Foundation ,12.9434146,77.5794143,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Leprosy Hospital ,12.974535,77.5637331,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Corporation Hospital ,12.972733,77.561517,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Victoria Hospital ,12.9633889,77.5738194,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Kempegowda Bus Station ,12.9768605,77.5723066,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sreenivasa Hospital ,12.9731027,77.5725154,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Amar Hospital ,12.9713429,77.5775719,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Jain Dental Centre ,12.9734218,77.5803754,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Mallige Smile Foundation ,12.9853257,77.5801058,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Government Ayurvedic Medical College ,12.9793279,77.5734497,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Hospital ,12.9883243,77.5723116,Y,9590727624"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "RVM Foundation Hospital ,12.813143,77.5820643,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Venkateshwara Dental College and Hospital ,12.82667,77.5549334,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vijayashree Hospitals ,12.8578783,77.5893062,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Krishna Hospital ,12.8678253,77.5960091,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Narayana Nethralaya ,12.8746201,77.595074,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Sri Krishna Hospital ,12.8809915,77.5980069,Y,8041177692"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Vasan Eye Care ,12.8822355,77.5957189,N,"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Fortis Hospital ,12.8945311,77.5989032,Y,7795055352"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "Apollo Hospitals ,12.896128,77.5985345,Y,8553686028"
},
{
"Name,Latitude,Longitude,Ambulance,Number": "The Nest - Maternity Hospital in Bangalore ,12.894852,77.598659,Y,9590727624"
}
]};
String dataToBeParsed = "Click on button to parse JSON.\n\n JSON DATA : \n\n"+strJson;
output.setText(dataToBeParsed);
bparsejson.setOnClickListener(new OnClickListener() {
public void onClick(View v) {

String OutputData = "";
JSONObject jsonResponse;

try {

/****** Creates a new JSONObject with name/value mappings from the JSON string. ********/
jsonResponse = new JSONObject(strJson);

/***** Returns the value mapped by name if it exists and is a JSONArray. ***/
/******* Returns null otherwise. *******/
JSONArray jsonMainNode = jsonResponse.optJSONArray("Android");
int lengthJsonArr = jsonMainNode.length();

for (int i = 0; i < lengthJsonArr; i++) {
/****** Get Object for each JSON node.***********/
JSONObject jsonChildNode = jsonMainNode.getJSONObject(i);

/******* Fetch node values **********/
int hospital_id = Integer.parseInt(jsonChildNode.optString("hospital_id").toString());
String hospital_name = jsonChildNode.optString("hospital_name").toString();
String Latitude = jsonChildNode.optString("Latitude").toString();
String Longitude = jsonChildNode.optString("Longitude").toString();
String Ambulance = jsonChildNode.optString("Ambulance").toString();
String Number = jsonChildNode.optString("Number").toString();


OutputData += "Node : \n\n " + hospital_id + " | "
+ hospital_name + " | "
+ Latitude + " |" + Longitude + "|\" +Ambulance+\"|\" +Number+\"\n\n ";
//Log.i("JSON parse", song_name);
}
output.setText( OutputData );

} catch (JSONException e) {

e.printStackTrace();
}

}
});
}




XML code:-

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ParseJsonAndroidExample" >

<Button
android:id="@+id/bparsejson"
android:text="Parse JSON Data Android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Button>

<textview>
android:id="@+id/output"
android:paddingTop="10px"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="" />

Please help me
Posted
Updated 26-Apr-16 7:44am

1 solution

That isn't valid json. You want something like:
final String strJson ="{\"hospitals\":[
{
\"Name\" : \"Motherhood\" ,
\"Latitude\" : 12.978289,
\"Longitude\" : 77.637149,
\"Ambulance\": false,
\"Number\": 0
},
...
]
}
   
Comments
Member 12484662 26-Apr-16 20:45pm
   
Hi, I agree. Now I have copied that json file in assets folder and I am able to read that data by writing below code and but in the same code I am getting error after that code where we are returning json. I am pasting the code below
package com.example.administrator.emergencyhealthcare;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.google.android.gms.common.api.GoogleApiClient;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;

/**
* Created by Administrator on 4/26/2016.
*/
public class ParseJsonAndroidExample extends Activity {

/**
* ATTENTION: This was auto-generated to implement the App Indexing API.
* See https://g.co/AppIndexing/AndroidStudio for more information.
*/

@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_parse_json_android_example);}


public String loadJSONFromAsset() throws JSONException {
String json = null;
try {

InputStream is = getAssets().open("hospital_details.json");

int size = is.available();

byte[] buffer = new byte[size];

is.read(buffer);

is.close();

json = new String(buffer, "UTF-8");


} catch (IOException ex) {
ex.printStackTrace();
return null;
}
return json;

}


try {
JSONObject obj = null;
try {
obj = new JSONObject(loadJSONFromAsset());
} catch (JSONException e1) {
e1.printStackTrace();
}
JSONArray m_jArry = obj.getJSONArray();
ArrayList<hashmap<string, string="">> formList = new ArrayList<hashmap<string, string="">>();
HashMap<string, string=""> m_li;

for (int i = 0; i < m_jArry.length(); i++) {
JSONObject jo_inside = m_jArry.getJSONObject(i);
Log.d("hospital details-->", jo_inside.getString("Name"));
String name_value = jo_inside.getString("Name");
String Latitude_value = jo_inside.getString("Latitude");
String Longitude_value = jo_inside.getString("Longitude");
String Ambulance_avail = jo_inside.getString("Ambulance");
String Number_value = jo_inside.getString("Number");






//Add your values in your `ArrayList` as below:
m_li = new HashMap<string, string="">();
m_li.put("Name", name_value);
m_li.put("Latitude", Latitude_value);
m_li.put("Longitude", Longitude_value);

m_li.put("Ambulance", Ambulance_avail);
m_li.put("Number", Number_value);


formList.add(m_li);
}
} catch (JSONException e) {
e.printStackTrace();
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900