0

I have these

JSONObject obj=new JSONObject();

obj.put("id","foo");

My id is string. What characters can I put instead of foo? Can I put these "\!@#$%^&*()'" ?

Pedro del Sol
  • 2,840
  • 9
  • 39
  • 52
user203860
  • 13
  • 4
  • 3
    Could you rephrase the question, as a native English speaker I have absolutely no clue what your question is – Stephen Connolly Feb 15 '13 at 08:50
  • 1
    1) The 'fragment' you show is not valid JSON. 2) Your question lacks a considerable amount of detail that is required in order to provide an answer - aka, what JSON framework are you using, how are you generating the main JSON message, ***what have you tried*** and what problems are you running into. – Perception Feb 15 '13 at 08:55
  • Is this [Java or JavaScript](http://stackoverflow.com/questions/245062/whats-the-difference-between-javascript-and-java)? Unless there's a lot more detail to this question that you're not telling us about, one of those tags has to go... – guypursey Feb 15 '13 at 10:05

1 Answers1

0

See http://www.json.org/ under string. You can use:

Any UNICODE character except " or \ or control character
David Lavender
  • 8,021
  • 3
  • 35
  • 55