I have customer data in Json and there will be 3 or 4 addresses associated to each customer. The parameter name is diff for each address but the class structure remains same.that is shipping and billing address will have same structure for address and phone number. So instead of creating diff address class like billingaddress and shippingaddress.Can we create a single class Address which will b used by all.I tried with creating custom jsonconverter. But the TOObject() ends up calling readjson method and it goes in infinite loop. A sample code snippet would help.Thanks.Below is my sample Json.{"CustomerName": "ABC","Sex": "Female","Samedaydelivery": "Y","OrderPrice": "123.12","addressinfo": {"maincust": {"maincustaddress": [{"Name": "XXX","Addressline1": "flatnumber","Addressline2": "Streetname","city": "London","zipcode": "123123"}],"Maincontact": [{"firstname": "Q","lastname": "A","contacts": [{"type": "EMAIL","email": "test@test.com","number": null}, {"number": "1231231231","type": "PHONE","email": null}]}]},"billinginfo": {"billaddress": [{"Name": "XXX","Addressline1": "flatnumber","Addressline2": "Streetname","city": "London","zipcode": "123123"}],"billingcontact": [{"firstname": "Q","lastname": "A","contacts": [{"type": "EMAIL","email": "test@test.com","number": null}, {"number": "1231231231","type": "PHONE","email": null}]}]},"shippinginfo": {"shippingaddress": [{"Name": "XXX","Addressline1": "flatnumber","Addressline2": "Streetname","city": "London","zipcode": "123123"}],"ship_contact": [{"firstname": "A","lastname": "Z","contacts": [{"type": "EMAIL","email": "test@test.com","number": null}, {"number": "1231231231","type": "PHONE","email": null}]}]}}} 解决方案 这篇关于将部分JSON反序列化为C#对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!