removed the json code and used FragmentStatePagerAdapter.