How to deserialize json string to object list in c# dot

前端 未结 4 1620
你的背包
你的背包 2020-12-15 21:56

I am working with the following JSON string

{
\"transactions\": 
[
   {
    \"paymentcharge\":\"0.0\",
    \"amount\":352,
    \"id\":13418,
    \"shippingc         


        
4条回答
  •  渐次进展
    2020-12-15 22:44

    first create another class:

    public class SalesTransactions
    {
         public List transactions {get;set;}
         public int count{get;set;}
    }
    

    Then use,

    JsonConvert.DeserializeObject(inputString)
    

提交回复
热议问题