title: Gson. converting to JSON a password with the character =
body: <p>I'm using Gson in an Android app to convert a complicated object to JSON representation. One of the fields is a string called QuickPin containing an encrypted password and the character "=" is converted to "\003d" by Gson.</p>
  
  <p>The Json string is consumed by a C# WEBAPI application, but returns "an error has occurred" message.</p>
  
  <p>The following JSON returns that error message :</p>
  
  <pre><code>{"UserContractID":"929c1399-11c4-490e-8cff-5b1458ac18e2","UserAuthentication":"MethodCombo":{"AuthMethod":[1]},"QuickPin":"mW2n2uTECEtVqWA2B9MzvQ\u003d\u003d"},"CustomerID":0,"OriginID":0,"OriginTypeID":0,"Status":0}
  </code></pre>
  
  <p>Meanwhile this JSON works fine :</p>
  
  <pre><code>{"UserContractID":"929c1399-11c4-490e-8cff-5b1458ac18e2","UserAuthentication":{"QuickPin":"mW2n2uTECEtVqWA2B9MzvQ==","MethodCombo":{"AuthMethod":[1]}},"CustomerID":0,"OriginID":0,"OriginTypeID":0,"Status":0}
  </code></pre>
  
  <p>Are there a way to force Gson to maintain the string with the password with the = (and others if is the case) characters?</p>
  
  <p>My Android code is :</p>
  
  <pre><code>Gson gson = new Gson();
  user = new User();
  user.UserAuthentication = new UserAuthentication();
  user.UserAuthentication.QuickPin = "mW2n2uTECEtVqWA2B9MzvQ==";
  user.UserAuthentication.MethodCombo = new MethodCombo();
  user.UserAuthentication.MethodCombo.AuthMethod = new ArrayList&lt;Integer&gt;();
  user.UserAuthentication.MethodCombo.AuthMethod.add(1);
  user.Status = 0;
  String jsonRepresentation = gson.toJson(user);
  object.put("user", jsonRepresentation);
  </code></pre>
  
  <p>Thanks</p>