Package com.jwplayer.pub.api
Class JsonHelper
java.lang.Object
com.jwplayer.pub.api.JsonHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerConfig
parseConfigJson
(JSONObject config) A JSON parser for PlayerConfig objects.static PlaylistItem
parsePlaylistItemJson
(JSONObject item) A JSON parser for PlaylistItem.static List<PlaylistItem>
parsePlaylistJson
(JSONObject playlist) A JSON parser for PlaylistItem objects.static String
toJson
(PlayerConfig item) static String
toJson
(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
-