Exemple #1
0
        public void JSON_SerializeMarshall()
        {
            CommonShared.Something s = new CommonShared.Something
            {
                Name        = "something",
                DateOfBirth = DateTime.Now
            };

            global::Core.Serialization.JSON.Jil.JSON json = null;

            json = new global::Core.Serialization.JSON.Jil.JSON();

            string json_text = json.SerializeMarshall <CommonShared.Something>(s);

            return;
        }
Exemple #2
0
        public void JSON_DeserializeUnmarshall()
        {
            string json_text =
                @"
                    {
                        ""Name"":""something""
                    }
                ";

            // https://github.com/kevin-montrose/Jil/blob/master/Jil/DateTimeFormat.cs
            // ""DateOfBirth"":""""
            // ""DateOfBirth"":""null""
            // ""DateOfBirth"":""2021-10-06T18:07:06.901969+02:00""
            // ""DateOfBirth"":""2021-10-06T18:07:06Z""

            global::Core.Serialization.JSON.Jil.JSON json = null;

            json = new global::Core.Serialization.JSON.Jil.JSON();

            CommonShared.Something s = json.DeserializeUnmarshall <CommonShared.Something>(json_text);

            return;
        }