title: How to convert List to Json in Java
body: <p>How to convert generic list to json in Java.I have class like this..</p>
  
  <pre><code>public class Output
  {
      public int Keyname { get; set; }
      public Object  outputvalue{ get; set; }  //outvalue may be even a object collection
  }
  
  List&lt;Output&gt; outputList = new List&lt;Output&gt;();
  </code></pre>
  
  <p>I want to convert outputList  into json in Java.After converting i will send it to client.</p>