Communication between java server and android client
<p>I have built a java server app and am trying to get my android app to communicate with it. After reading <a href="http://stackoverflow.com/questions/5150779/android-client-server-communication">Android Client Server communication</a> I tried the socket example. However I have run into a wall because on the server side I can return an array of my object but on the client side I'm not able to retrieve it since buffereader takes a string only
Server code</p>

<pre><code>public List&lt;Person&gt; processInput(String theInput) {
    String peopleOutput = null;
        List&lt;Person&gt; people = new ArrayList&lt;Person&gt;();



    if (state == WAITING) {
               SqliteDBhelper db = new SqliteDBhelper();
                people = db.getPeople();
return people;
</code></pre>

<p>Client code</p>

<pre><code>BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
List&lt;Person&gt; fromServer;
String fromUser;

while ((fromServer = in.readLine()) != null) {
  List&lt;Person&gt; people = new ArrayList&lt;Person&gt;();
  Person person = new Person();
  people = fromServer;
</code></pre>

<p>So from the looks of it I cannot pass an object via this socket method. Will the json do what I need? I just dont want to spend another day coding somthing that won't work for me. All I'm trying to do is have a db that my server has access to, the server reads the db and returns the table data in the form of my objects.</p>
