Ejemplo n.º 1
0
        public static void WriteClassWithGenericList()
        {
            string json;

            {
                TestClassWithGenericList obj = new TestClassWithGenericList();
                obj.Initialize();
                obj.Verify();
                json = JsonSerializer.ToString(obj);
            }

            {
                TestClassWithGenericList obj = JsonSerializer.Parse <TestClassWithGenericList>(json);
                obj.Verify();
            }

            {
                TestClassWithGenericList obj = JsonSerializer.Parse <TestClassWithGenericList>(TestClassWithGenericList.s_data);
                obj.Verify();
            }
        }
Ejemplo n.º 2
0
        public static void WriteClassWithObjectArray()
        {
            string json;

            {
                TestClassWithGenericList obj = new TestClassWithGenericList();
                obj.Initialize();
                obj.Verify();
                json = JsonSerializer.WriteString(obj);
            }

            {
                TestClassWithGenericList obj = JsonSerializer.ReadString <TestClassWithGenericList>(json);
                obj.Verify();
            }

            {
                TestClassWithGenericList obj = JsonSerializer.Read <TestClassWithGenericList>(TestClassWithGenericList.s_data);
                obj.Verify();
            }
        }
Ejemplo n.º 3
0
        public static void ReadClassWithGenericList()
        {
            TestClassWithGenericList obj = JsonSerializer.Parse <TestClassWithGenericList>(TestClassWithGenericList.s_data);

            obj.Verify();
        }