View Full Version : encode ' in java

24 Nov 2007, 10:26 PM
I need to pass some data via xhr which contains the single quote '. Obviously, this conflicts with the delimiter used for JSON data. How am I suppose to encode this data array on the java side? and how to decode on the extjs side?

25 Nov 2007, 12:03 AM
1. http://www.google.com.au/search?hl=en&q=java+json+encode&btnG=Google+Search&meta=
2. Use:

var o = Ext.decode(str);

25 Nov 2007, 12:32 AM
I use org.json.me library to encode my JSON responses. www.json.org. It handles all the encoding for me.