public static void WriteClassWithObjectImmutableTypes() { string json; { TestClassWithObjectImmutableTypes obj = new TestClassWithObjectImmutableTypes(); obj.Initialize(); obj.Verify(); json = JsonSerializer.ToString(obj); } { TestClassWithObjectImmutableTypes obj = JsonSerializer.Parse <TestClassWithObjectImmutableTypes>(json); obj.Verify(); } { TestClassWithObjectImmutableTypes obj = JsonSerializer.Parse <TestClassWithObjectImmutableTypes>(TestClassWithObjectImmutableTypes.s_data); obj.Verify(); } }
public static void ReadClassWithObjectImmutableTypes() { TestClassWithObjectImmutableTypes obj = JsonSerializer.Parse <TestClassWithObjectImmutableTypes>(TestClassWithObjectImmutableTypes.s_data); obj.Verify(); }