title: JSON parser in Java automatically converting a String to a number/integer
body: <p>I have a Java object that contains a few String variables. When creating a json message from a Java object if one of the String values is alpha numeric, then the conversion will return back a quoted value. Else the conversion will return back a numeric value.</p>
  
  <p>Example: </p>
  
  <pre><code>Class User {
     String userid , password;
  }
  </code></pre>
  
  <p>if <code>userid = "tom"</code> and <code>password = "123456"</code> then the JSON conversion returns back</p>
  
  <p><code>"userid":"tom"</code> and <code>"password":123456</code>   (numeric)</p>
  
  <p>It should actually return <code>"password":"123456"</code> </p>
  
  <p>How can I achieve this? I am using the Java parser from json.org and below is a snippet of code that converts the Java object to Json.</p>
  
  <pre><code>final JSONObject jsonObject = XML.toJSONObject(writer.toString());
  res = jsonObject.toString(4);
  </code></pre>