title: Serve image/file in json
body: <p>assume that I have class like this</p>
  
  <pre><code>public class Entity {
      private String name;
      private File file;
  
      // Getters &amp; setters
  }
  </code></pre>
  
  <p>is it possible to return object of this class as json? I'm using jax-rs </p>