title: GsonBuilder setPrettyPrinting doesn't print pretty
body: <p>I'm using the following code (<a href="https://www.mkyong.com/java/how-to-enable-pretty-print-json-output-gson/" rel="noreferrer">found on this webpage</a>) and the Gson library (2.8.2) to format JSON code with pretty printing.</p>
  
  <pre><code>import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  
  public class GsonExample {
      public static void main(String[] args) {
        String jsonData = "{\"name\":\"mkyong\",\"age\":35,\"position\":\"Founder\",\"salary\":10000,\"skills\":[\"java\",\"python\",\"shell\"]}";
  
        Gson gson = new GsonBuilder().setPrettyPrinting().create();
        String json = gson.toJson(jsonData);
  
        System.out.println(json);
      }
  }
  </code></pre>
  
  <p>This is the expected result:</p>
  
  <pre><code>{
    "name": "mkyong",
    "age": 35,
    "position": "Founder",
    "salary": 10000,
    "skills": [
      "java",
      "python",
      "shell"
    ]
  }
  </code></pre>
  
  <p>Unfortunately "pretty printing" doesn't work at all and I get everything in one line:</p>
  
  <pre><code>{\"name\":\"mkyong\",\"age\":35,\"position\":\"Founder\",\"salary\":10000,\"skills\":[\"java\",\"python\",\"shell\"]}"
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>