I am trying to serialize the project, but all the time I get an exception when reading a line
[DataContract] public class ImageManipulatorViewModel : BaseViewModel { [DataMember] public ObservableCollection<Collage> ImageList { get { return this.imageList; } set { this.imageList = value; base.RaisePropertyChanged("ImageList"); } } var storageFolder = ApplicationData.Current.LocalFolder; var sampleFile = await storageFolder.CreateFileAsync("MyProject.Collage", CreationCollisionOption.ReplaceExisting); string l =JsonConvert.SerializeObject(this.ImageList); аwait FileIO.WriteTextAsync(sampleFile, l); string tres = JsonConvert.DeserializeObject(l).ToString(); this.ImageList.Clear(); this.ImageList = JsonConvert.DeserializeObject<ObservableCollection<Collage>>(tres.ToString()); } public class Collage { public Thickness Position { get; set; } public WriteableBitmap Image { get; set; } } I get this error
Сould not create an instance of type Windows.Storage.Streams.IBuffer. Type is an interface or abstract class and cannot be instantiated. Path '[0].Image.PixelBuffer', line 10, position 23.