Save This Page
Home » json » org.json » [javadoc | source]
org.json
public class: CookieList [javadoc | source]
java.lang.Object
   org.json.CookieList
Convert a web browser cookie list string to a JSONObject and back.
Method from org.json.CookieList Summary:
toJSONObject,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.json.CookieList Detail:
 public static JSONObject toJSONObject(String string) throws JSONException 
    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 cooklist, cookielistJSONObject.put(cookieJSONObject.getString("name"), cookieJSONObject.getString("value"));
 public static String toString(JSONObject o) throws JSONException 
    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".