title: Convert Exception to JSON
body: <p>Is it possible, in Java 7, to convert an <code>Exception</code> object into Json?</p>
  
  <p>example:</p>
  
  <pre><code>try {      
      //something
  } catch(Exception ex) {     
      Gson gson = new Gson();
      System.out.println(gson.toJson(ex));
  }
  </code></pre>