Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Richfaces UI Components UI 4.1.0.20110910-M2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.json
Class CookieList

    java.lang.Object
      org.richfaces.json.CookieList

    public final class CookieList

extends java.lang.Object

Convert a web browser cookie list string to a JSONObject and back.

Version:
  2
Author:
  JSON.org

Method Summary
`static JSONObject` | `toJSONObject(java.lang.String string)` Convert a cookie list into a JSONObject.
`static java.lang.String` | `toString(JSONObject o)` Convert a JSONObject into a cookie list.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### toJSONObject

    public static JSONObject toJSONObject(java.lang.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"));

  Parameters:
    `string` - A cookie list string
  Returns:
    A JSONObject
  Throws:
    `JSONException`

### toString

    public static java.lang.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".

  Parameters:
    `o` - A JSONObject
  Returns:
    A cookie list string
  Throws:
    `JSONException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Richfaces UI Components UI 4.1.0.20110910-M2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.