Home | History | Annotate | Download | only in model

Lines Matching refs:json

24 import org.json.JSONArray;
25 import org.json.JSONException;
26 import org.json.JSONObject;
41 * Utility class to get a list of MusicTrack's based on a server-side JSON
48 private static final String CATALOG_URL = "http://storage.googleapis.com/automotive-media/music.json";
220 private MediaMetadata buildFromJSON(JSONObject json, String basePath) throws JSONException {
221 String title = json.getString(JSON_TITLE);
222 String album = json.getString(JSON_ALBUM);
223 String artist = json.getString(JSON_ARTIST);
224 String genre = json.getString(JSON_GENRE);
225 String source = json.getString(JSON_SOURCE);
226 String iconUrl = json.getString(JSON_IMAGE);
227 int trackNumber = json.getInt(JSON_TRACK_NUMBER);
228 int totalTrackCount = json.getInt(JSON_TOTAL_TRACK_COUNT);
229 int duration = json.getInt(JSON_DURATION) * 1000; // ms
231 LogHelper.d(TAG, "Found music track: ", json);
233 // Media is stored relative to JSON file
263 * Download a JSON file from a server, parse the content and return the JSON
284 LogHelper.e(TAG, "Failed to parse the json for media list", e);