Example #1
0
        public void FromJson_CorrectJsonClass()
        {
            //arrange
            var json      = ExpectedJson;
            var jsonClass = new JsonUnknownPropertyClass();

            //act
            FromJson(jsonClass, json);

            //assert
            Assert.That(jsonClass.Age, Is.EqualTo(42));
            Assert.That(jsonClass.Height, Is.EqualTo(176));
            Assert.That(jsonClass.Size, Is.EqualTo(12));
        }
Example #2
0
 protected override ReadOnlySpan <char> FromJson(JsonUnknownPropertyClass value, string json)
 {
     return(Encoding.UTF8.GetString(_convert.FromJson(value, Encoding.UTF8.GetBytes(json))));
 }
Example #3
0
 protected abstract ReadOnlySpan <char> FromJson(JsonUnknownPropertyClass value, string json);
Example #4
0
 protected override ReadOnlySpan <char> FromJson(JsonUnknownPropertyClass value, string json)
 {
     return(_convert.FromJson(value, json));
 }