public void ToFile(string filename = null)
{
if (filename == null)
{
filename = dataPath;
}
if (filename == null)
{
filename = Constants.DATA_DIR + @"\speechresponder.json";
}
string json = JsonConvert.SerializeObject(this, Formatting.Indented);
File.WriteAllText(filename, json);
}
}