Ejemplo n.º 1
0
 public static string ToString(this Dataset dataset) => JsonSerializer.Serialize(dataset, new JsonSerializerOptions
 {
     PropertyNamingPolicy = JsonNamingPolicy.CamelCase
 });
Ejemplo n.º 2
0
 public static void ToJson(this Dataset dataset, string fileName) => File.WriteAllText($"{Directory.GetCurrentDirectory()}/data/{fileName}", JsonSerializer.Serialize(dataset, new JsonSerializerOptions
 {
     PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
     WriteIndented        = true,
     Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
 }));