Lines Matching refs:json
24 import org.json.JSONArray;
25 import org.json.JSONException;
26 import org.json.JSONObject;
43 * Utility class to get a list of MusicTrack's based on a server-side JSON
51 "http://storage.googleapis.com/automotive-media/music.json";
250 private MediaMetadata buildFromJSON(JSONObject json, String basePath) throws JSONException {
251 String title = json.getString(JSON_TITLE);
252 String album = json.getString(JSON_ALBUM);
253 String artist = json.getString(JSON_ARTIST);
254 String genre = json.getString(JSON_GENRE);
255 String source = json.getString(JSON_SOURCE);
256 String iconUrl = json.getString(JSON_IMAGE);
257 int trackNumber = json.getInt(JSON_TRACK_NUMBER);
258 int totalTrackCount = json.getInt(JSON_TOTAL_TRACK_COUNT);
259 int duration = json.getInt(JSON_DURATION) * 1000; // ms
261 LogHelper.d(TAG, "Found music track: ", json);
263 // Media is stored relative to JSON file
293 * Download a JSON file from a server, parse the content and return the JSON
313 LogHelper.e(TAG, "Failed to parse the json for media list", e);