<commit_before>﻿using Newtonsoft.Json;
using System;
using Xamarin.Forms;

namespace CrisisCheckinMobile.SaveLoad
{
	public class Serialize
	{
		public Serialize() { }

		public void SaveObject(string filename, Object obj)
		{
			string text = JsonConvert.SerializeObject(obj);
			DependencyService.Get<ISaveAndLoad>().SaveText(filename, text);
		}

		public Object LoadObject(string filename)
		{
			string text = DependencyService.Get<ISaveAndLoad>().LoadText(filename);
			return JsonConvert.DeserializeObject<Object>(text);
		}
	}
}<commit_msg>Serialize methods are static & generic<commit_after>﻿using Newtonsoft.Json;
using System;
using Xamarin.Forms;

namespace CrisisCheckinMobile.SaveLoad
{
	public static class Serialize
	{
		public static void SaveObject<T>(string filename, T obj)
		{
			string text = JsonConvert.SerializeObject(obj);
			DependencyService.Get<ISaveAndLoad>().SaveText(filename, text);
		}

		public static T LoadObject<T>(string filename)
		{
			string text = DependencyService.Get<ISaveAndLoad>().LoadText(filename);
			return JsonConvert.DeserializeObject<T>(text);
		}
	}
}
{'fraction_non_alphanumeric': 0.10569105691056911, 'fraction_numerical': 0.0, 'mean_word_length': 5.441860465116279, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1118414', 'n_tokens_mistral': 369, 'n_tokens_neox': 336, 'n_words': 71}