title: How to return my string value with whitespace
body: <p>How can I modify my main class so that I can receive values without losing the whitespace?</p>
  
  <p>Here is a portion of my main class:</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
  Scanner s = new Scanner(new FileReader(new File("C:/User/waithaka/Documents//duka.json")));
  while (s.hasNext()) {
      sb.append(s.next());
  }
  s.close();
  
  GsonBuilder gsonBuilder = new GsonBuilder();
  Gson gson = gsonBuilder.create();
  
  String jstring = sb.toString();
  Result results = gson.fromJson(jstring, Result.class);
  List&lt;data&gt; dat = response.getData();
  for (data data : dat) {
      System.out.println("The item is " + data.getItem());
  }
  </code></pre>
  
  <p>The last line prints the values without whitespace. For example, a value with the string <code>"Black and yellow"</code> will be changed to <code>"Blackandyellow"</code>.</p>