title: What serialization format should we use to store serializaed objects in a SQL Server database
body: <p>We are developing a customized caching solution that will use a SQL Server database to store cached objects. The hosting environment of the application does not provide an "in-memory" cache such as memcached or app fabric so we must use a SQL Server database.</p>
  
  <p>While most of the cached objects will be simple types (int, string, dates, etc) we will need to also store more complex types such as <code>DataSet</code>s, <code>DataTable</code>s, generic collections and custom classes.  </p>
  
  <p>I have very little experience with the .NET's native serialization and deserialization but I figure we will have to serialize the objects into some form (binary, xml, JSON, etc) to store it in the database and then deserialize it when we pull it out of the database. I would like to have some expert opinions on what the the "some form" should be.</p>
  
  <p>We are using JSON.NET to serialize data into JSON for various AJAX requests. My initial thought was to serialize the cached data into JSON to store it in the database. However, I wanted to get a few opinions as to what would be best for performance and data integrity. </p>