Exemplo n.º 1
0
        public static void WriteToFile(this IJsonSerializable serializable, string filePath, IDiagnosticLogger?logger)
        {
            using var file   = File.Create(filePath);
            using var writer = new Utf8JsonWriter(file);

            serializable.WriteTo(writer, logger);
            writer.Flush();
        }
Exemplo n.º 2
0
 public static void WriteSerializableValue(
     this Utf8JsonWriter writer,
     IJsonSerializable value)
 {
     value.WriteTo(writer);
 }