title: Persisting app data with custom classes
body: <p>I am creating a Windows 8 app that needs to contain two main types of data - <code>List&lt;Project&gt;</code> and <code>List&lt;User&gt;</code>, where <code>Project</code> and <code>User</code> are data models containing different types of data (including <code>List</code>s of other objects etc). </p>
  
  <p>I have previously been making Windows Phone apps, and there I simply used the application settings to store data in similar scenarios. So I hoped that would work in Windows 8 as well.</p>
  
  <p>I have elected to use the <code>ApplicationData.Current.LocalSettings</code>-structure to save my app data. However, whenever I try to save my data, I get this type of error:</p>
  
  <blockquote>
    <p>WinRT information: Error trying to serialize the value to be written to the application data store Additional information: Data of this type is not supported.</p>
  </blockquote>
  
  <p>The models are marked with <code>[DataContract]</code> attributes if that makes any difference.</p>
  
  <p>As far as I have <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx" rel="nofollow">understood Microsoft</a>, only standard data types (like booleans, strings etc) can be saved in this fashion. Is this correct?</p>
  
  <p>And if so, how could I save data structured in this way?</p>
  
  <p>Help would be greatly appreciated!</p>