Class JsonHelper

java.lang.Object
com.jwplayer.pub.api.JsonHelper

public class JsonHelper extends Object
  • Method Details

    • 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 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 String toJson(PlaylistItem item)
    • toJson

      public static String toJson(PlayerConfig item)