title: Android: using jackson to parse JSON object by object
body: <p>I want to access data from a database in my android app. For this, I'm using a PHP webservice and JSON format data. When I ask the webservice for data, I get something like this:</p>
  
  <pre><code>{"products":
    [
      {"product":["prod_id_1","prod_name_1","prod_barcode_1","prod_brand_1","prod_wrapper_1","12.00000"]},
      {"product":["prod_id_2","prod_name_2","prod_barcode_2","prod_brand_2","prod_wrapper_2","24.00000"]}
    ]
  }
  </code></pre>
  
  <p>But with 1000+ products. Obviously, jsonObject and jsonArray are inneficient for this. So I'd like to use Jackson streaming json parser. I can't keep a list of products in my app, as that would consume much memory. So what I want to do is to read one product from the json, write it at my android SQLite database, read the next product, write it to database and so on.</p>
  
  <p>I've seen this <a href="http://www.mkyong.com/java/how-to-convert-java-object-to-from-json-jackson/" rel="nofollow">example</a> but if I used this, I'd have to use a list of products. So my question is, how can I read this jsonarray, product by product?</p>
  
  <p>Thanks in advance.</p>