title: How to modify a single value in JSONObject?
body: <p>I'm using Google Play Games Snapshot and I have to pass in the data I need to save by using JSON.</p>
  
  <p>Here is the JSON file:</p>
  
  <pre><code>{"Date":1531043635316,"Daily bonus":2,"sound enabled":true,"total coins":2099300,"high score":0,"Btns Set":1,"leftBtnX":46,"leftBtnY":18,"leftBtnsize":1,"upBtnX":105,"upBtnY":18,"upBtnsize":1,"rightBtnX":164,"rightBtnY":18,"rightBtnsize":1,"guardBtnX":288,"guardBtnY":18,"guardBtnsize":1,"chargeBtnX":363,"chargeBtnY":18,"chargeBtnsize":1,"attackBtnX":438,"attackBtnY":18,"attackBtnsize":1,"superBtnX":438,"superBtnY":58,"superBtnsize":1,"ultimateBtnX":363,"ultimateBtnY":58,"ultimateBtnsize":1,"dpadX":80,"dpadY":40,"dpadSize":1,"gpadX":405,"gpadY":59,"gpadSize":1}
  </code></pre>
  
  <p>Now when I try to change only one of them using this code:</p>
  
  <pre><code>private byte[] saveToJSON(){
      try {
          JSONObject obj = new JSONObject();
          obj.put("total coins", Settings.totalCoins);
          return obj.toString().getBytes();
      } catch (JSONException e) {
          e.printStackTrace();
          throw new RuntimeException("Error converting save data to JSON.", e);
      }
  }
  </code></pre>
  
  <p>The entire file get's changed to only this single parameter, it becomes this:</p>
  
  <pre><code>{"total coins":2099300}
  </code></pre>
  
  <p>Now how Can I just modify a single parameter value?</p>
  
  <p>Sorry, this is the first time for me to work with JSON </p>