Package org.json

Class CookieList


  • @Deprecated
    public class CookieList
    extends java.lang.Object
    Deprecated.
    Use javax.json or other other json libraries instead
    Convert a web browser cookie list string to a JSONObject and back.
    • Constructor Summary

      Constructors 
      Constructor Description
      CookieList()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static JSONObject toJSONObject​(java.lang.String string)
      Deprecated.
      Convert a cookie list into a JSONObject.
      static java.lang.String toString​(JSONObject jo)
      Deprecated.
      Convert a JSONObject into a cookie list.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CookieList

        public CookieList()
        Deprecated.
    • Method Detail

      • toJSONObject

        public static JSONObject toJSONObject​(java.lang.String string)
                                       throws JSONException
        Deprecated.
        Convert a cookie list into a JSONObject. A cookie list is a sequence of name/value pairs. The names are separated from the values by '='. The pairs are separated by ';'. The names and the values will be unescaped, possibly converting '+' and '%' sequences. To add a cookie to a cookie list, cookielistJSONObject.put(cookieJSONObject.getString("name"), cookieJSONObject.getString("value"));
        Parameters:
        string - A cookie list string
        Returns:
        A JSONObject
        Throws:
        JSONException
      • toString

        public static java.lang.String toString​(JSONObject jo)
                                         throws JSONException
        Deprecated.
        Convert a JSONObject into a cookie list. A cookie list is a sequence of name/value pairs. The names are separated from the values by '='. The pairs are separated by ';'. The characters '%', '+', '=', and ';' in the names and values are replaced by "%hh".
        Parameters:
        jo - A JSONObject
        Returns:
        A cookie list string
        Throws:
        JSONException