how can send a json frame to mysever hear i can reserve a json and i wnd send the data
<p>I posted the code I used for reading the data from my server but I don't know how to send a json frame to the server.</p>

<p>I want to send the data string.</p>

<pre><code>try {
    URL url = new URL(params[0]);
    con = (HttpURLConnection)url.openConnection();
    con.connect();

    InputStream in = con.getInputStream();
    red = new BufferedReader(new InputStreamReader(in));
    String line = "";
    buffer = new StringBuffer();
    while ((line=red.readLine())!= null){
        buffer.append(line);
}
return buffer.toString();
</code></pre>