示例#1
0
        static void Main(string[] args)
        {
            // {"@context":"https://schema.org","@type":"CustomType","Name":"Hello World"}
            var inputObj = new CustomType
            {
                Name = "Hello World"
            };

            var json = SchemaSerializer.SerializeObject(inputObj);

            var outputObj = SchemaSerializer.DeserializeObject <CustomType>(json);
        }
 private static T DeserializeObject <T>(string json)
     where T : IValues
 => SchemaSerializer.DeserializeObject <TestModel <T> >(json).Property;