public virtual ItemCollectionSerializationModel DeserializeCollection(object serializedData) { Assert.IsTrue(serializedData is string, "Serialized data is not string, json collection serializer can only use a JSON string."); var model = new ItemCollectionSerializationModel(); JsonSerializer.DeserializeTo(ref model, serializedData as string, null); return(model); }
public virtual object SerializeCollection(ItemCollectionBase collection) { var serializationModel = new ItemCollectionSerializationModel(collection); return(JsonSerializer.Serialize(serializationModel, null)); }