title: PHP consuming JSON stream
body: <p>I have a client/server app in which the client sends objects in the form of JSON to the server which runs a PHP script and then places this data into a database. </p>
  
  <p>The problem is that decoding is done with the json_decode function which seems to work on strings not streams. Is there a way to take the inpustream from the HTTP request and use a streaming JSON parser to reduce the memory foot print.</p>
  
  <p>I come from a java background where there are a couple of frameworks like jackson , xtream for this. Is there a PHP equivalent? Otherwise it seems I'll run into scalability issues.</p>