public string Serialize(bool saveToFile = true, string filename = null)
{
string json = JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
if (string.IsNullOrEmpty(filename))
{
filename = this.m_filename;
}
if (saveToFile)
{
File.WriteAllText(filename, json);
}
return json;
}