public void LoadFromJSON(string jsonString) { if (string.IsNullOrEmpty(jsonString)) { return; } WorkoutPlaylist workoutPlaylist = JsonConvert.DeserializeObject <WorkoutPlaylist>(jsonString); if (workoutPlaylist == null) { return; } this.definition = workoutPlaylist.definition; this.songs = workoutPlaylist.songs; for (int index = 0; index < this.songs.Count; ++index) { this.songs[index].musicActionList = MusicActionListSerializer.instance.ReadSerializedActionList(this.songs[index].serialisedActionList); } }
public WorkoutPlaylist(WorkoutPlaylist playlist) { definition = new WorkoutInfo(playlist.definition); songs = new List <SongDefinition>(playlist.songs); }