Class JsonHelper


  • public class JsonHelper
    extends java.lang.Object
    • Method Detail

      • parseConfigJson

        @Nullable
        public static PlayerConfig parseConfigJson​(org.json.JSONObject config)
        A JSON parser for PlayerConfig objects.
        Parameters:
        config - A JSON representation of the PlayerConfig
        Returns:
        Native PlayerConfig object
      • parsePlaylistJson

        @Nullable
        public static java.util.List<PlaylistItem> parsePlaylistJson​(org.json.JSONObject playlist)
        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

        @Nullable
        public static PlaylistItem parsePlaylistItemJson​(org.json.JSONObject item)
        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

        public static java.lang.String toJson​(PlaylistItem item)
      • toJson

        public static java.lang.String toJson​(PlayerConfig item)