title: Is that mandatory to use @XmlRootElement for JSON responce also in Jersey webservices?
body: <p>My code actually contains one resource class and one BEan class it's return type is JSON.</p>
  <h2>Resource Class</h2>
  <pre class="lang-java prettyprint-override"><code>@Path(&quot;/json&quot;)
  public class JSONRetrive {
  
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      public JSONT getJson(){
          JSONT jsont = new JSONT();
          jsont.setJsont(&quot;inr&quot;);
          return jsont;
      }
  }
  </code></pre>
  <p>/* Is there any Annotation will represent JSON. Do i need to use any other Annotation for this.*/</p>
  <h2>My Bean class</h2>
   <pre class="lang-java prettyprint-override"><code>//@XmlRootElement
  public class JSONT {
  private String jsont;
  
  public String getJsont() {
      return jsont;
  }
  
  public void setJsont(String jsont) {
      this.jsont = jsont;
  }
  
  }
  </code></pre>
  <p>If i uncomment @XmlRootElement it is working fine is there any other alternative solution for this</p>