title: Java Json subjective pretty printing
body: <p>Using the below, my gson builder prints this:</p>
  
  <pre><code>try (Writer writer = Files.newBufferedWriter(Paths.get(path + ".json"), StandardCharsets.UTF_8)) {
          new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create().toJson(item, writer);
      } catch (Exception e) {
          logger.log(e);
      }
  </code></pre>
  
  <p>results in:</p>
  
  <pre><code>"dharoks": {
      "inventory": [
        {
          "id": 4718.0,
          "amount": 1.0
        },
        {
          "id": 15272.0,
          "amount": 1.0
        },
        {
          "id": 23279.0,
          "amount": 1.0
        },
        {
          "id": 23255.0,
          "amount": 1.0
        },
        {
          "id": 15272.0,
          "amount": 1.0
        },
        {
          "id": 15272.0,
          "amount": 1.0
        }
      ]
  </code></pre>
  
  <p>How can I make it so pretty-printing only prettifies certain data, i.e how can I make the result something like this:</p>
  
  <pre><code>"dharoks": {
      "inventory": [
        { "id": 23279.0, "amount": 1.0 },
        { "id": 23255.0, "amount": 1.0 },
        { "id": 15272.0, "amount": 1.0 },
        { "id": 15272.0, "amount": 1.0 },
      ]
  </code></pre>
  
  <p>I want only Object(id, amount) to NOT use pretty printing (with the excetion of newline), everything else should.</p>