title: Can you avoid Gson converting "<" and ">" into unicode escape sequences?
body: <p>I noticed that <a href="http://code.google.com/p/google-gson/" rel="noreferrer">Gson</a> converts the string "&lt;" into an unicode escape sequence in JSON output. Can you avoid this somehow, or do characters like "&lt;" and ">" always have to be escaped in JSON?</p>
  
  <p>Consider this example which prints <code>{"s":"\u003c"}</code>; I'd want simply  <code>{"s":"&lt;"}</code>.</p>
  
  <pre><code>public static void main(String[] args) {
      Gson gson = new GsonBuilder().create();
      System.out.println(gson.toJson(new Foo()));  
  }
  
  static class Foo {
      String s = "&lt;";
  }
  </code></pre>
  
  <p>Context: the piece of JSON I'm creating has nothing to do with HTML pages or even JavaScript; it's just used to pass certain structured information to another piece of software (embedded in a device, written in C).</p>