2011-03-15 30 views
5

Aşağıda i NewtonsJson.net.3.5dönüştürme Bu benim sınıftır

[ 
    { 
     "message": { 
      "$": "@12:55 Big Rally on South Bound of Dr. B.A. Road. Motorists may use RAK Road, P. D'Melow Road & A.B. Road for CST.\n -visit icicilombard.com" 
     }, 
     "picture": { 
      "$": "" 
     }, 
     "medium": { 
      "$": "API" 
     }, 
     "timestamp": { 
      "$": "03\/15\/2011 12:55:42 IST" 
     } 
    } 
] 

kullanıyorum

dersime listesine ayrıştırmak çalışıyorum benim json dize vardır Collection Nesne benim json

public class GupShupTrafficAlerts 
    { 
     private string _message = string.Empty; 

     private string _picture = string.Empty; 

     private string _medium = string.Empty; 

     private string _timeStamp = string.Empty; 

     public String message 
     { 
      get; 
      set; 
     } 

     public string timestamp 
     { 
      get; 
      set; 
     } 

     public string medium 
     { 
      get; 
      set; 
     } 

     public string picture 
     { 
      get; 
      set; 
     } 
    } 

olarak ayrıştırılamaz istediğiniz bu Listeye ayrıştırmak çalışırken yolu im olan

ama boşuna bana yardım edin...

cevap

3

JSON böyle görünmelidir:

[ 
    { 
     "message": "@12:55 Big Rally on South Bound of Dr. B.A. Road. Motorists may use RAK Road, P. D'Melow Road & A.B. Road for CST.\n -visit icicilombard.com", 
     "picture": "", 
     "medium": "API", 
     "timestamp":"03\/15\/2011 12:55:42 IST" 
    } 
] 
+0

Hey Jakub, bu benim için çalıştı Thanx – Riz

İlgili konular