Class Overview
Convert a web browser cookie list string to a JSONObject and back.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
Public Methods
public
static
JSONObject
toJSONObject
(String string)
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"));
Parameters
string
| A cookie list string |
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".