title: Returning a blob with json
body: <p>I'm trying to create a rest service for my android application where an external database returns items to be stored in the applications local database.  I've got everything working except blobs are being returned as null. </p>
  
  <p>this is an example of my jason response.(picture and thumbnail fields are blobs)</p>
  
  <pre><code>{"id":"2","user_id":"1","name":"testing","type":"bouldering","picture":null,"lat":"36","long":"81","alt":"41932","accuracy":"53","thumbnail":null}
  </code></pre>
  
  <p>Here is my php script to return the data.</p>
  
  <pre><code>&lt;?php
  require_once('config.php');
  
  $mysqli = new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
  $sql = 'select * from spot_main';
  $results =$mysqli-&gt;query($sql);
  
  $spots = array();  //array to parse jason from
  
  while($spot = $results-&gt;fetch_assoc()){
      $spots[] = $spot;                                                           
  }
  
  echo json_encode($spots);
  ?&gt;
  </code></pre>
  
  <p>Anyone know of a solution to this problem?  I know I'm not doing this the most efficient way(better to store images in the filesystem), but I need this to work.</p>