title: What is the Best way to convert org.json.JSONObject to javax.sql.rowset.serial.SerialBlob?
body: <p>Currently I use following method, but I do not like it:</p>
  
  <pre><code>JSONObject formJsonObj = new JSONObject();
  formJsonObj.put("whatever", "whatever is inside");
  
  ByteArrayOutputStream b = new ByteArrayOutputStream();
  ObjectOutputStream o = new ObjectOutputStream(b);
  o.writeObject(formJsonObj );
  byte[] byteArray = b.toByteArray();
  
  SerialBlob blob = new SerialBlob(byteArray);
  </code></pre>
  
  <p>Is there a better way?</p>