How do i save Dictionary to a file and then read it from it? can't really find anything usefull on t
x
System.Text.Json FileCompile: 543.542ms | Execution: 40.919ms | React with ❌ to remove this embed.

System.Text.JsonFileusing System.Text.Json;
var p = new Dictionary<string, string>()
{
{ "Hello", "World" },
{ "It's me", "Mario" }
};
var serialized = JsonSerializer.Serialize(p);
File.WriteAllText("/tmp/test.json", serialized);
var deserialized = JsonSerializer.Deserialize<Dictionary<string,string>>(File.ReadAllText("/tmp/test.json"));
deserialized{
"Hello": "World",
"It's me": "Mario"
}