RestSharp Deserialization with JSON Array

后端 未结 5 1161
北海茫月
北海茫月 2021-01-01 15:27

I have a JSON response that I\'m trying to deserialize with RestSharp, and it looks like this:

{\"devices\":[{\"device\":{\"id\":7,\"deviceid\":\"abc123\",\"         


        
5条回答
  •  温柔的废话
    2021-01-01 15:29

    RestShartp doesn't support DataAnnotation/DataMember, rename your properties with no maj:

    • Devices -> devices
    • Device -> device

    AND don't forget the {get; set;} ;).

提交回复
热议问题