Create a Cookie
in JavaEE
. I JSONObject
and I do conversion to a string ( .toJSONString
).
Displays the following: java.lang.IllegalArgumentException: An invalid character [34] was present in the Cookie value
Java 8, IDEA 2016 2.
For creating:
Cookie cookie = new Cookie(name, URLEncoder.encode(value, "UTF-8"));
For reading:
String value = URLDecoder.decode(cookie.getValue(), "UTF-8");
Taken from here
Source: https://ru.stackoverflow.com/questions/558935/
All Articles
json
object -{"dontRemember":false,"id":1,"categories":"unlock","hash":"0ab8c0e0cbc7ae1bce28d8b03c1b75b7"}
- Tsyklop