예제 #1
0
        private void GenerateJsonFileFor(DummyDataHolder data, string key)
        {
            var json = GetJsonOf(data);
            var path = GetDummyDataPath(key);

            EnsurePathExists(path);
            File.WriteAllText(path, json);
        }
예제 #2
0
 private string GetJsonOf(DummyDataHolder data)
 => $"{{\"Text\":\"{data.Text}\",\"Number\":{data.Number}}}";