using System.IO; using System.Text.Json; using System.Collections.Generic; var dict = new Dictionary(); foreach (var str in Data.Strings) { if (!string.IsNullOrWhiteSpace(str.Content)) { if(!dict.ContainsKey(str.Content)) { dict.Add(str.Content, str.Content); } } } // Türkçe karakterlerin bozulmaması için özel kodlayıcı kullanıyoruz var options = new JsonSerializerOptions { WriteIndented = true, Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; string json = JsonSerializer.Serialize(dict, options); File.WriteAllText("strings.json", json);