BO4ETestProject/TestAbstractDeserialization.cs
/// <summary>
///     similar to <see cref="TestMaLoDeserializationNewtonsoft" /> but with .NET5
/// </summary>
similar to  but with .NET5
similar to but with . NET5
[TestMethod]
        public void TestMaLoDeserializationNet5()
        {
            JsonDocument json;
            using (var r = new StreamReader("BoMapperTests/marktlokation_simple.json"))
            {
                var jsonString = r.ReadToEnd();
                json = JsonDocument.Parse(jsonString);
            }
            var options = LenientParsing.MOST_LENIENT.GetJsonSerializerOptions();
            var maloString = json.RootElement.GetProperty("input").GetRawText();
            var malo = JsonSerializer.Deserialize<Marktlokation>(maloString, options);
            Assert.IsNotNull(malo);
            var bo = JsonSerializer.Deserialize<BusinessObject>(maloString, options);
            Assert.IsNotNull(bo);
            Assert.IsInstanceOfType(bo, typeof(Marktlokation));
        }
[ TestMethod ] public void TestMaLoDeserializationNet5 ( ) { JsonDocument json ; using ( var r = new StreamReader ( " " ) ) { var jsonString = r . ReadToEnd ( ) ; json = JsonDocument . Parse ( jsonString ) ; } var options = LenientParsing . MOST_LENIENT . GetJsonSerializerOptions ( ) ; var maloString = json . RootElement . GetProperty ( " " ) . GetRawText ( ) ; var malo = JsonSerializer . Deserialize < Marktlokation > ( maloString , options ) ; Assert . IsNotNull ( malo ) ; var bo = JsonSerializer . Deserialize < BusinessObject > ( maloString , options ) ; Assert . IsNotNull ( bo ) ; Assert . IsInstanceOfType ( bo , typeof ( Marktlokation ) ) ; }
similar to  but with .NET5
similar to but with . NET5