Skip to content

Instantly share code, notes, and snippets.

@Rayzbam
Last active October 4, 2022 09:52
Show Gist options
  • Save Rayzbam/aa2d7c834055e2c64a67a9b8475bf30d to your computer and use it in GitHub Desktop.
Save Rayzbam/aa2d7c834055e2c64a67a9b8475bf30d to your computer and use it in GitHub Desktop.
public class TestEnumerator2
{
public string Name { get; set; }
public bool IsSucceed { get; set; }
public ObservableCollection<int> Toto { get; set; }
public TestEnumerator2()
{
Toto = new ObservableCollection<int>();
}
}
var serialize = JsonSerializer.Serialize(new TestEnumerator2(),new JsonSerializerOptions { ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.Preserve});
var deserialize = JsonSerializer.Deserialize<TestEnumerator>(serialize);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment