Package com.jwplayer.pub.api
Class JsonHelper
java.lang.Object
com.jwplayer.pub.api.JsonHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerConfigparseConfigJson(JSONObject config) A JSON parser for PlayerConfig objects.static PlaylistItemparsePlaylistItemJson(JSONObject item) A JSON parser for PlaylistItem.static List<PlaylistItem>parsePlaylistJson(JSONObject playlist) A JSON parser for PlaylistItem objects.static StringtoJson(PlayerConfig item) static StringtoJson(PlaylistItem item)
-
Method Details
-
parseConfigJson
A JSON parser for PlayerConfig objects.- Parameters:
config- A JSON representation of the PlayerConfig- Returns:
- Native PlayerConfig object
-
parsePlaylistJson
A JSON parser for PlaylistItem objects. Use this to parse Media and Playlist responses from the JW Player Delivery API.- Parameters:
playlist- The Delivery API response for Media or Playlists- Returns:
- Native list of PlaylistItem objects
-
parsePlaylistItemJson
A JSON parser for PlaylistItem. Use this to parse a single PlaylistItem from JSON.- Parameters:
item- The JSON representation of a PlaylistItem- Returns:
- Native PlaylistItem object
-
toJson
-
toJson
-