title: Json to avro conversion
body: <p>I'm converting Json to avro. I have json data in  <code>JSONArray</code>. So while converting it into byte array i'm facing the problem.</p>
  
  <p>below is my code:</p>
  
  <pre><code>static byte [] fromJsonToAvro(JSONArray json, String schemastr) throws Exception {
  
  ExcelToJson ejj = new ExcelToJson();
  List&lt;String&gt; list = new ArrayList&lt;String&gt;();
  
  
  if (json != null) { 
      int len = json.length();
      for (int i=0;i&lt;len;i++){ 
          list.add(json.get(i).toString());
      } 
  }
  
  
  InputStream input = new ByteArrayInputStream(list.getBytes()); //json.toString().getBytes()
  
   DataInputStream din = new DataInputStream(input); 
                    .
                    . 
                    .//rest of the logic
  </code></pre>
  
  <p>So how can i do it? How to convert JsonArray object to bytes(i.e., how to use getBytes() method for JsonArray objects). The above code giving an error at <code>list.getBytes()</code> and saying getBytes() is undifined for list.</p>