title: MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
body: <p>Trying to send info in JSON format using Retrofit, but it enters into Retrofit's <code>onFailure</code> method and throws the following error:</p>
  
  <pre><code>com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
  </code></pre>
  
  <p>So far I have tried to solve it by using the answers from the following links:
  1) <a href="https://stackoverflow.com/questions/27485346/malformedjsonexception-with-retrofit-api">MalformedJsonException with Retrofit API?</a>
  2) <a href="https://stackoverflow.com/questions/39918814/use-jsonreader-setlenienttrue-to-accept-malformed-json-at-line-1-column-1-path">Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $</a></p>
  
  <p>Here is my code:</p>
  
  <p>Retrofit interface:</p>
  
  <pre><code>public interface ServerApi {
      @POST("/register/test")
      Call&lt;User&gt; createAccount(@Body User user);
  }
  </code></pre>
  
  <p>MainActivity with connection stuff:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(@Nullable Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          User user= new User("myemail@mail.ru","vercode100");
          sendNetworkRequest(user);
      }
  
      private void sendNetworkRequest(User user){
  
          //create Retrofit instance
          Retrofit.Builder builder= new Retrofit.Builder()
                  .baseUrl("http://localhost:8080")
                  .addConverterFactory(GsonConverterFactory.create());
  
          Retrofit retrofit= builder.build();
  
          //Get client and call object for the request
          ServerApi client= retrofit.create(ServerApi.class);
          Call&lt;User&gt; call= client.createAccount(user);
  
          call.enqueue(new Callback&lt;User&gt;() {
              @Override
              public void onResponse(Call&lt;User&gt; call, Response&lt;User&gt; response) {
              }
  
              @Override
              public void onFailure(Call&lt;User&gt; call, Throwable t) {
              }
          });
  
      }
  }
  </code></pre>
  
  <p>User class:</p>
  
  <pre><code>public class User {
      private String email;
      private String verificationCode;
  
      public User(String email, String verificationCode) {
          this.email = email;
          this.verificationCode = verificationCode;
      }
  
  }
  </code></pre>
  
  <p>The server side expects JSON like this:</p>
  
  <pre><code>{
      "email" : "user.email",
      "verificationCode" : "123456"
  }
  </code></pre>
  
  <p><strong>I know that there are some common questions in stackoverflow, but neither of them fully solves my problem.</strong></p>