Android Open Source - StudySpaces Json Data






From Project

Back to project page StudySpaces.

License

The source code is released under:

Apache License

If you think the Android project StudySpaces 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.pennstudyspaces.api;
//  ww  w. j  a v  a  2  s .  c  o  m
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;

import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;

public class JsonData {
    private static final String TAG = JsonData.class.getSimpleName();

    private ArrayList<Building> buildings;

    public static JsonData sendRequest (ApiRequest request)
            throws IOException {
        ObjectMapper mapper = new ObjectMapper();
        mapper.configure(
                DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, true);
        JsonData data = mapper.readValue(
                new URL(request.createRequest()), JsonData.class);
        return data;
    }

    public ArrayList<Building> getBuildings() {
        return buildings;
    }

    private void setBuildings(ArrayList<Building> buildings) {
        this.buildings = buildings;
    }
    
}




Java Source Code List

com.pennstudyspaces.DataListAdapter.java
com.pennstudyspaces.MainActivityDead.java
com.pennstudyspaces.MainActivityTest.java
com.pennstudyspaces.MainActivity.java
com.pennstudyspaces.MyItemizedOverlay.java
com.pennstudyspaces.PrefsActivity.java
com.pennstudyspaces.RoomDetailsActivityTest.java
com.pennstudyspaces.RoomDetailsActivity.java
com.pennstudyspaces.SearchActivityTest.java
com.pennstudyspaces.SearchActivity.java
com.pennstudyspaces.StudySpacesApplication.java
com.pennstudyspaces.api.ApiRequest.java
com.pennstudyspaces.api.Availability.java
com.pennstudyspaces.api.Building.java
com.pennstudyspaces.api.DataDumpRequest.java
com.pennstudyspaces.api.JsonData.java
com.pennstudyspaces.api.ParamsRequest.java
com.pennstudyspaces.api.RoomKind.java
com.pennstudyspaces.api.Room.java
com.pennstudyspaces.api.StudySpacesData.java