jbossas/jboss-dmr — pull request #7 by nscavell (2013-02-15 21:11:54+00:00)
Title: Support UTF-8 for JSON

Went ahead and took a stab at supporting UTF-8 for both parsing and displaying JSON. I left the readFromString method alone (still using US-ASCII).

I looked at a couple of libraries: org.json, json-smart, jackson, jettision and they all behave slightly differently when it comes to escaping unicode characters.

Jettision seemed to be the most accurate and it meets the requirements of the GateIn team wrt to localization. It behaves closely to http://www.ietf.org/rfc/rfc4627.txt as it only escapes unicode characters \u0000 through \u001F. It does not however escape forward slash.