title: How to manage large JSON documents with phone development?
body: <p>I have a very large JSON document I'm bringing to a phone to consume.  The JSON document has thousands of objects of different types in it, all structured hierarchy to a loose domain model.</p>
  
  <p>The problem is it takes over 6 seconds for my HTC Titan to deserialize the file.  And I'm pretty much locked in to loading the entire file every time I want to use just a little of it.  So I'm looking for alternatives.  The ones I thought of are:</p>
  
  <ol>
  <li><p>Accept the 6 second deserialization delay and whenever the user goes out of a dormant state on the phone, the user will have to deal with it.  That pretty much shuts out any hope of using the scheduled background processes on the phone that limit the amount of memory and CPU used.</p></li>
  <li><p>Don't use object deserialization with the JSON and use the JObject framework to access the data as I need it.</p></li>
  <li><p>Break up the JSON to use one object for every Aggregate type, then have file indexes to make searching for relationships easier.</p></li>
  <li><p>Migrate the whole thing to SQL Server using the built-in Linq to SQL functionality.  I don't like this alternative because sticking with JSON for this project would make interfacing with external APIs easier with less conversion.</p></li>
  <li><p>Use a third party nosql database (I didn't find anything that supported JSON documents directly)</p></li>
  </ol>
  
  <p>What is the best way to deal with large JSON documents in a phone environment?</p>