System.Text.Json Deserialize nested object from API call - Data is wrapped in parent JSON property

后端 未结 4 1692
春和景丽
春和景丽 2021-01-22 16:40

I have an API JSON response that wraps the data content in a data property, which looks like this:

{ 
   \"d         


        
4条回答
  •  不思量自难忘°
    2021-01-22 17:05

    Either you get rid of the data object or you can write a custom json Converter. I suggest to change the sent data or just consume it as it is because what you are trying to do is not a best practice.

提交回复
热议问题