0

how to fetch data from local json file?

Using this I fetch data from local json file. But I want to display every details which are present in json file which is stored in internal memory have to diaplay in list view. I tried to pass every data as string and use it. But It is not working.

Please provide some other solution to do this.

Community
  • 1
  • 1
user3879110
  • 17
  • 1
  • 7

1 Answers1

0

you have ask for Example so here

JSONObject jsonObject = new JSONObject(data)//data will from your file 

TextView tvTitle = (TextView)findViewById(R.id.textviewtTitle);
tvTitle.setText(jsonObject.optString("title);
MilapTank
  • 9,988
  • 7
  • 38
  • 53