Android Open Source - Svnit-Events People J S O N Parser






From Project

Back to project page Svnit-Events.

License

The source code is released under:

MIT License

If you think the Android project Svnit-Events listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.bhatt.ramani.svnitevents;
/*from   www  . j av a 2s .  co  m*/
import com.bhatt.ramani.svnitevents.models.People;

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

import java.util.ArrayList;
import java.util.List;

public class PeopleJSONParser {
    public static List<People> getPeoples(String data) {
        List<People> peoples = new ArrayList<People>();

        try {
        JSONObject jsonObject = new JSONObject(data);
        JSONArray peoplesArray = jsonObject.getJSONArray("peoples");

            for (int i = 0;i < peoplesArray.length(); i++) {
                People people = new People();
                JSONObject peopleJSON = peoplesArray.getJSONObject(i);
                people.setPeopleBio(peopleJSON.getString("people_bio"));
                people.setBio(peopleJSON.getString("people_bio"));
                people.setPhone(peopleJSON.getString("contact_no"));
                people.setName(peopleJSON.getString("name"));
                people.setRole(peopleJSON.getString("role"));
                people.setTwitterHandle(peopleJSON.getString("twitter"));

                peoples.add(people);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return peoples;
    }

}




Java Source Code List

com.android.vending.billing.IInAppBillingService.java
com.android.vending.billing.IInAppBillingService.java
com.bhatt.ramani.svnitevents.AboutUs.java
com.bhatt.ramani.svnitevents.EventHttpClient.java
com.bhatt.ramani.svnitevents.EventLruCache.java
com.bhatt.ramani.svnitevents.Form.java
com.bhatt.ramani.svnitevents.MainActivity.java
com.bhatt.ramani.svnitevents.PeopleDetailActivity.java
com.bhatt.ramani.svnitevents.PeopleJSONParser.java
com.bhatt.ramani.svnitevents.PeopleListAdapter.java
com.bhatt.ramani.svnitevents.PeopleListFragment.java
com.bhatt.ramani.svnitevents.PeopleListLoader.java
com.bhatt.ramani.svnitevents.ScheduleJSONParser.java
com.bhatt.ramani.svnitevents.ScheduleListAdapter.java
com.bhatt.ramani.svnitevents.ScheduleListFragment.java
com.bhatt.ramani.svnitevents.ScheduleListLoader.java
com.bhatt.ramani.svnitevents.SessionDetailActivity.java
com.bhatt.ramani.svnitevents.SimpleSectionedListAdapter.java
com.bhatt.ramani.svnitevents.TwitterStreamAdapter.java
com.bhatt.ramani.svnitevents.TwitterStreamFragment.java
com.bhatt.ramani.svnitevents.TwitterStreamLoader.java
com.bhatt.ramani.svnitevents.Utils.java
com.bhatt.ramani.svnitevents.models.People.java
com.bhatt.ramani.svnitevents.models.Session.java
com.jakewharton.disklrucache.DiskLruCache.java
com.jakewharton.disklrucache.StrictLineReader.java
com.jakewharton.disklrucache.Util.java
com.scringo.scringolib.BuildConfig.java
com.scringo.scringolib.BuildConfig.java