Xamarin ListView not show json results from api - xamarin

same as title,my listview doesn't show me anything,i think my model in that app is not good
help! deseeerialized json in jsonObject then create a list of objectModel but not show me
thanks
public class Marvel
{
}
public class TextObject
{
public string type { get; set; }
public string language { get; set; }
public string text { get; set; }
}
public class Url
{
public string type { get; set; }
public string url { get; set; }
}
public class Series
{
public string resourceURI { get; set; }
public string name { get; set; }
}
public class Variant
{
public string resourceURI { get; set; }
public string name { get; set; }
}
public class Date
{
public string type { get; set; }
public DateTime date { get; set; }
}
public class Price
{
public string type { get; set; }
public double price { get; set; }
}
public class Thumbnail
{
public string path { get; set; }
public string extension { get; set; }
}
public class Image
{
public string path { get; set; }
public string extension { get; set; }
}
public class Item
{
public string resourceURI { get; set; }
public string name { get; set; }
public string role { get; set; }
public string type { get; set; }
}
public class Creators
{
public int available { get; set; }
public string collectionURI { get; set; }
public List<Item> items { get; set; }
public int returned { get; set; }
}
public class Characters
{
public int available { get; set; }
public string collectionURI { get; set; }
public List<Item> items { get; set; }
public int returned { get; set; }
}
public class Stories
{
public int available { get; set; }
public string collectionURI { get; set; }
public List<Item> items { get; set; }
public int returned { get; set; }
}
public class Events
{
public int available { get; set; }
public string collectionURI { get; set; }
public List<object> items { get; set; }
public int returned { get; set; }
}
public class Result
{
public int id { get; set; }
public int digitalId { get; set; }
public string title { get; set; }
public int issueNumber { get; set; }
public string variantDescription { get; set; }
public string description { get; set; }
public DateTime modified { get; set; }
public string isbn { get; set; }
public string upc { get; set; }
public string diamondCode { get; set; }
public string ean { get; set; }
public string issn { get; set; }
public string format { get; set; }
public int pageCount { get; set; }
public List<TextObject> textObjects { get; set; }
public string resourceURI { get; set; }
public List<Url> urls { get; set; }
public Series series { get; set; }
public List<Variant> variants { get; set; }
public List<object> collections { get; set; }
public List<object> collectedIssues { get; set; }
public List<Date> dates { get; set; }
public List<Price> prices { get; set; }
public Thumbnail thumbnail { get; set; }
public List<Image> images { get; set; }
public Creators creators { get; set; }
public Characters characters { get; set; }
public Stories stories { get; set; }
public Events events { get; set; }
}
public class Data
{
public int offset { get; set; }
public int limit { get; set; }
public int total { get; set; }
public int count { get; set; }
public List<Result> results { get; set; }
}
public class Rooto
{
public int code { get; set; }
public string status { get; set; }
public string copyright { get; set; }
public string attributionText { get; set; }
public string attributionHTML { get; set; }
public string etag { get; set; }
public Data data { get; set; }
}
}
mainpage
private async void Button_Clicked(object sender, EventArgs e)
{
var texto = caja.Text;
var request = new HttpRequestMessage();
request.RequestUri = new Uri("https://gateway.marvel.com/v1/public/comics?title=hulk&ts=1&apikey=###&hash=###");
request.Method = HttpMethod.Get;
request.Headers.Add("Accept", "application/json");
var client = new HttpClient();
HttpResponseMessage response = await client.SendAsync(request);
string content = await response.Content.ReadAsStringAsync();
Result dataObjects = JsonConvert.DeserializeObject<Result>(content);
JObject myJObject = JObject.Parse(content);
Console.WriteLine(myJObject);
List<Result> parsedFields = new List<Result>();
parsedFields.Add(dataObjects);
ListDemo.ItemsSource = parsedFields;
my xaml and json
https://gateway.marvel.com/v1/public/comics?title=hulk&ts=1&apikey=ab07bf416406297274b27ca941ba3bee&hash=cf9eb501d7c3775c32b72c61a6a76805
<ContentPage.Content>
<StackLayout>
<Label Text="Control ListView" FontSize="40"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Button Text="Lamado API" Clicked="Button_Clicked"/>
<Entry x:Name="caja" Text=""/>
<ListView x:Name="ListDemo">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal">
<Image Source="{Binding resourceURI}"
WidthRequest="50"
HeightRequest="50"/>
<StackLayout Orientation="Vertical">
<Label Text="{Binding title}"
FontSize="15" TextColor="Blue"/>
<Label Text="{Binding isbn}"
FontSize="12" TextColor="Fuchsia"/>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage.Content>
tnaka

You try binding it to an observablecollection.
private ObservableCollection<Result> _parsedFields = new ObservableCollection<Result>();
public ObservableCollection<Result> ParsedFields {
get{ return _parsedFields;}
set{
_parsedFields = value ;
OnPropertyChanged("ParsedFields");
}
}
make sure to implement INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
}
then in your button function:
var dataObjects = JsonConvert.DeserializeObject<ObservableCollection<Result>>(content);
ParsedFields = dataObjects;
ListDemo.ItemsSource = ParsedFields;

The root level is supposed to be Root not Result class .
Modify your code as below
Root dataObjects = JsonConvert.DeserializeObject<Root>(text);
ListDemo.ItemsSource = dataObjects.data.results;

Related

Web API JSON deserialization converting value issue

I am trying to insert JSON data into my models via EF 6. I am getting this error;
Inner Exception is {0}System.ArgumentException: Could not cast or convert from System.String to EPINMiddleWareAPI.Models.Serial.
konum: Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
konum: Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
konum: Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
Message ---
{0}Error converting value "c57a55b5-b2d4-46e7-86e0-cc13726ca8a7" to type 'EPINMiddleWareAPI.Models.Serial'. Path 'coupons[0].serials[0]', line 1, position 310.
Here is my model structure:
public class ConfirmResponse
{
public int Id { get; set; }
public string referenceId { get; set; }
public string version { get; set; }
public string signature { get; set; }
public string paymentID { get; set; }
public string productCode { get; set; }
public string currency { get; set; }
public string ApplicationCode { get; set; }
public double unitPrice { get; set; }
public double totalPrice { get; set; }
public string purchaseStatusCode { get; set; }
public DateTime? purchaseStatusDate { get; set; }
public DateTime? requestDateTime { get; set; } = DateTime.Now;
public string merchantProductCode { get; set; }
public List<Coupon> coupons { get; set; }
}
public class Coupon
{
public int Id { get; set; }
public int ConfirmResponseID { get; set; }
public List<Serial> serials { get; set; }
public List<Pin> pins { get; set; }
public virtual ConfirmResponse confirmResponse { get; set; }
}
public class Serial
{
public int Id { get; set; }
public string serials { get; set; }
public int CouponID { get; set; }
public virtual Coupon coupons { get; set; }
}
My sample JSON:
"{\"referenceId\":\"0000000046\",\"paymentId\":\"MDO1037624\",\"productCode\":\"001002461285\",\"quantity\":\"1\",\"currency\":\"TL\",\"unitPrice\":\"46,47\",\"totalPrice\":\"46,47\",\"merchantProductCode\":\"\",\"purchaseStatusCode\":\"00\",\"purchaseStatusDate\":\"2019-03-17T20:58:48Z\",\"coupons\":[{\"serials\":[\"c57a55b5-b2d4-46e7-86e0-cc13726ca8a7\"],\"pins\":[\"T6VC-XC6X-3H6JS-NVWL-93PCa\"]}],\"version\":\"V1\",\"signature\":\"2f961c7dbc32c3bc128b6e69d19e8e1a\",\"applicationCode\":\"52e7cf966b724749a7c4efadc3727ed7\"}"
How can I fix this problem? I would like to insert this JSON into my database tables. I am using EF 6.
edit:
This model structure solved my problem. Now I can insert serials and pins into database.
public class ConfirmResponse
{
public int Id { get; set; }
public string referenceId { get; set; }
public string version { get; set; }
public string signature { get; set; }
public string paymentID { get; set; }
public string productCode { get; set; }
public string currency { get; set; }
public string ApplicationCode { get; set; }
public double unitPrice { get; set; }
public double totalPrice { get; set; }
public string purchaseStatusCode { get; set; }
public DateTime? purchaseStatusDate { get; set; }
public DateTime? requestDateTime { get; set; } = DateTime.Now;
public string merchantProductCode { get; set; }
public List<Coupon> coupons { get; set; }
}
public class Coupon
{
public int Id { get; set; }
public int ConfirmResponseID { get; set; }
public List<string> serials { get; set; }
public List<string> pins { get; set; }
public virtual ConfirmResponse confirmResponse { get; set; }
public List<string> StringsSerial
{
get { return serials; }
set { serials = value; }
}
public List<string> StringsPin
{
get { return pins; }
set { pins = value; }
}
[Required]
public string Serial
{
get { return String.Join(",", serials); }
set { serials = value.Split(',').ToList(); }
}
[Required]
public string Pin
{
get { return String.Join(",", pins); }
set { pins = value.Split(',').ToList(); }
}
}
Thanks in advance.
you're json is wrong
take a look into the coupons array, you initialize the serials array with an string/guid and not with a model of serial
it should be
"coupons": [{
{
"serials": [{
"serials": "c57a55b5-b2d4-46e7-86e0-cc13726ca8a7"
}
],
}
}
]...
I guess for Pins the same

How to add custom text to Picker's ItemDisplayBinding in Xamarin Forms

I want to add A custom text to my Picker. I have a picker the ItemsSource and ItemDisplayBinding binds from my database How can I add a custom text to my ItemDisplayBinding I want to mix Retailer Code with PresStreet and format to "Retailer Code - Street" My table is below for reference
Picker Title="Select Retailer Code" x:Name="codePicker" SelectedIndexChanged="codePicker_SelectedIndexChanged" ItemsSource="{Binding RetailerCode}" ItemDisplayBinding="{Binding RetailerCode}" StyleClass="fieldForm" IsEnabled="False"
My code below is how I get the data from my database and add the data to my picker
var db = DependencyService.Get<ISQLiteDB>();
var conn = db.GetConnection();
var getCode = conn.QueryAsync<RetailerGroupTable>("SELECT * FROM tblRetailerGroup WHERE ContactID=?", item.ContactID);
var resultCount = getCode.Result.Count;
if (resultCount > 0)
{
var result = getCode.Result;
codePicker.ItemsSource = result;
codePicker.IsEnabled = true;
}
else
{
lstName.IsVisible = false;
codePicker.IsEnabled = false;
}
My retailer group table:
[Table("tblRetailerGroup")]
public class RetailerGroupTable
{
[PrimaryKey, MaxLength(100)]
public string RetailerCode { get; set; }
public int ContactID { get; set; }
[MaxLength(300)]
public string PresStreet { get; set; }
[MaxLength(90)]
public string PresBarangay { get; set; }
[MaxLength(90)]
public string PresDistrict { get; set; }
[MaxLength(90)]
public string PresTown { get; set; }
[MaxLength(90)]
public string PresProvince { get; set; }
[MaxLength(90)]
public string PresCountry { get; set; }
[MaxLength(30)]
public string Telephone1 { get; set; }
[MaxLength(30)]
public string Telephone2 { get; set; }
[MaxLength(20)]
public string Mobile { get; set; }
[MaxLength(50)]
public string Email { get; set; }
[MaxLength(200)]
public string GPSCoordinates { get; set; }
[MaxLength(100)]
public string Coordinator { get; set; }
public DateTime LastSync { get; set; }
public DateTime ServerUpdate { get; set; }
public DateTime MobileUpdate { get; set; }
}
add a read only property to your class RetailerGroupTable
public string DisplayText {
get {
return $"{RetailerCode} - {PresStreet}";
}
}
and then bind to it
<Picker ItemDisplayBinding="{Binding DisplayText}" ... />

Cannot deserialize the current JSON object xamarin.forms

Im using xamarin.forms to create an app that uses the MusixMatch api. It's throwing the following exception : Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"}) into type 'System.Collections.Generic.List. To my knowledge, Ive done everything correctly, not sure why this exception is being thrown. Any help will be appreciated.
TrackList.cs
public class TrackList
{
public class Track
{
public int track_id { get; set; }
public string track_mbid { get; set; }
public string track_isrc { get; set; }
public string track_spotify_id { get; set; }
public string track_soundcloud_id { get; set; }
public string track_xboxmusic_id { get; set; }
public string track_name { get; set; }
public int track_rating { get; set; }
public int track_length { get; set; }
public int commontrack_id { get; set; }
public int instrumental { get; set; }
}
public class Body
{
public IList<Track> track_list { get; set; }
}
}
Api Request
public async void SearchBtn(object sender, EventArgs e)
{
List<TrackList.Track> trans = new List<TrackList.Track>();
string search = SearchField.Text;
try
{
var content = "";
HttpClient client = new HttpClient();
var RestUrl = "http://api.musixmatch.com/ws/1.1/track.search?q_track=" + search + "&page_size=3&page=1&s_track_rating=desc";
client.BaseAddress = new Uri(RestUrl);
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = await client.GetAsync(RestUrl);
content = await response.Content.ReadAsStringAsync();
var items = JsonConvert.DeserializeObject<List<TrackList.Body>>(content);
listTracks.ItemsSource = items;
}
catch (Exception ex)
{
string exception = ex.Message;
}
}
The json from PostMan
{
"message": {
"header": {
"status_code": 200,
"execute_time": 0.013219118118286,
"available": 10000
},
"body": {
"track_list": [
{
"track": {
"track_id": 143296606,
"track_mbid": "",
"track_isrc": "",
"track_spotify_id": "",
"track_soundcloud_id": "",
"track_xboxmusic_id": "",
"track_name": "&Burn",
"track_name_translation_list": [],
"track_rating": 61,
"track_length": 179,
"commontrack_id": 79313332,
"instrumental": 0,
"explicit": 0,
"has_lyrics": 1,
"has_lyrics_crowd": 0,
"has_subtitles": 1,
"has_richsync": 1,
"num_favourite": 19,
"lyrics_id": 17324950,
"subtitle_id": 19405016,
"album_id": 27788309,
"album_name": "Dont Smile At Me",
"artist_id": 34955086,
"artist_mbid": "",
"artist_name": "Billie Eilish feat. Vince Staples",
"album_coverart_100x100": "http://s.mxmcdn.net/images-storage/albums/nocover.png",
"album_coverart_350x350": "",
"album_coverart_500x500": "",
"album_coverart_800x800": "",
"track_share_url": "https://www.musixmatch.com/lyrics/Billie-Eilish-feat-Vince-Staples/burn-with-Vince-Staples?utm_source=application&utm_campaign=api&utm_medium=IT+Related%3A1409617652911",
"track_edit_url": "https://www.musixmatch.com/lyrics/Billie-Eilish-feat-Vince-Staples/burn-with-Vince-Staples/edit?utm_source=application&utm_campaign=api&utm_medium=IT+Related%3A1409617652911",
"commontrack_vanity_id": "Billie-Eilish-feat-Vince-Staples/burn-with-Vince-Staples",
"restricted": 0,
"first_release_date": "2017-12-15T00:00:00Z",
"updated_time": "2017-12-17T22:53:56Z",
"primary_genres": {
"music_genre_list": []
},
"secondary_genres": {
"music_genre_list": []
}
}
}
]
}
}
}
You're telling it to deserialize the result to a list, when actually the result is object with 1 property (message) which has 2 properties (header and body), so make sure your object structure matches. I find json2csharp extremely handy for complex structures like this.
public class TrackListResponse
{
public Message message { get; set; }
public class Header
{
public int status_code { get; set; }
public double execute_time { get; set; }
public int available { get; set; }
}
public class PrimaryGenres
{
public List<object> music_genre_list { get; set; }
}
public class SecondaryGenres
{
public List<object> music_genre_list { get; set; }
}
public class Track
{
public int track_id { get; set; }
public string track_mbid { get; set; }
public string track_isrc { get; set; }
public string track_spotify_id { get; set; }
public string track_soundcloud_id { get; set; }
public string track_xboxmusic_id { get; set; }
public string track_name { get; set; }
public List<object> track_name_translation_list { get; set; }
public int track_rating { get; set; }
public int track_length { get; set; }
public int commontrack_id { get; set; }
public int instrumental { get; set; }
public int #explicit { get; set; }
public int has_lyrics { get; set; }
public int has_lyrics_crowd { get; set; }
public int has_subtitles { get; set; }
public int has_richsync { get; set; }
public int num_favourite { get; set; }
public int lyrics_id { get; set; }
public int subtitle_id { get; set; }
public int album_id { get; set; }
public string album_name { get; set; }
public int artist_id { get; set; }
public string artist_mbid { get; set; }
public string artist_name { get; set; }
public string album_coverart_100x100 { get; set; }
public string album_coverart_350x350 { get; set; }
public string album_coverart_500x500 { get; set; }
public string album_coverart_800x800 { get; set; }
public string track_share_url { get; set; }
public string track_edit_url { get; set; }
public string commontrack_vanity_id { get; set; }
public int restricted { get; set; }
public DateTime first_release_date { get; set; }
public DateTime updated_time { get; set; }
public PrimaryGenres primary_genres { get; set; }
public SecondaryGenres secondary_genres { get; set; }
}
public class TrackList
{
public Track track { get; set; }
}
public class Body
{
public List<TrackList> track_list { get; set; }
}
public class Message
{
public Header header { get; set; }
public Body body { get; set; }
}
}
Then just deserialize to the outer object:
JsonConvert.DeserializeObject<TrackListResponse>(content);
I think you can't deserialize a single object into a collection. So you should use TrackList.Body instead of List<TrackList.Body>
So you maybe have to change this line:
var items = JsonConvert.DeserializeObject<List<TrackList.Body>>(content);
to
var items = JsonConvert.DeserializeObject<TrackList.Body>(content);
then iterate each item in items to add them to a List<TrackList.Body>

Microsoft Cognitive Services Web Search API - DeSerialization Issues

I want to learn Cognitive Services Web Search APIs so I started creating a bot application . I already have a account sub- key and other required information also I read many articles and watch build 2016 videos on this as well.I am having trouble while deserializing the result .
I am not able to find the proxy class that I can use to do that .
The url I am using is https://api.cognitive.microsoft.com/bing/v5.0/search/
and I found a proxy class for previous api version . Can anybody tell me how to get proxy class of the api request / response in VS 2015 for these service.
My Code look like this:
string BingSearchUrl = "https://api.cognitive.microsoft.com/bing/v5.0/search/";
const string bingKey = "Key";
public static async Task<string> Search(string query)
{
var client = HttpClientFactory.Create();
var queryString = BingSearchUrl + "?q=" + query + "&count=10";
// Request headers
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", bingKey);
client.DefaultRequestHeaders.Add("Accept", "application/json");
// Request parameters
string r = await client.GetStringAsync(queryString);
var jsonResult = JsonConvert.DeserializeObject<Bing.ExpandableSearchResult>(r);
return jsonResult.Web.First().Title;
Try below code
public string BingSearchUrl = "https://api.cognitive.microsoft.com/bing/v5.0/search/";
const string bingKey =[KEY];
public async void Search()
{
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
// Request headers
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", bingKey);
// Request parameters
queryString["q"] = "microsoft";
queryString["count"] = "10";
queryString["offset"] = "0";
queryString["mkt"] = "en-us";
queryString["safeSearch"] = "Moderate";
var uri = "https://api.cognitive.microsoft.com/bing/v5.0/news/search?" + queryString;
var response = await client.GetStringAsync(uri);
var jsonResult = JsonConvert.DeserializeObject<BingJson>(response);
string title = jsonResult.value[0].name.ToString();
}
With the jsonResult.value[0] you can loop through the results. First results is at [0] position.
I Created a model class looking at the bing search response json. It looks like,
public class BingJson
{
public string _type { get; set; }
public Instrumentation instrumentation { get; set; }
public string readLink { get; set; }
public int totalEstimatedMatches { get; set; }
public Value[] value { get; set; }
}
public class Instrumentation
{
public string pingUrlBase { get; set; }
public string pageLoadPingUrl { get; set; }
}
public class Value
{
public string name { get; set; }
public string url { get; set; }
public string urlPingSuffix { get; set; }
public Image image { get; set; }
public string description { get; set; }
public About[] about { get; set; }
public Provider[] provider { get; set; }
public DateTime datePublished { get; set; }
public string category { get; set; }
}
public class Image
{
public Thumbnail thumbnail { get; set; }
}
public class Thumbnail
{
public string contentUrl { get; set; }
public int width { get; set; }
public int height { get; set; }
}
public class About
{
public string readLink { get; set; }
public string name { get; set; }
}
public class Provider
{
public string _type { get; set; }
public string name { get; set; }
}
With this model, I am able to get the desired result. The Model which is presented in the other answer is not working in my case.
namespace BingSearchBot
{
public class RootObject
{
public string _type { get; set; }
public WebPages webPages { get; set; }
public RelatedSearches relatedSearches { get; set; }
public RankingResponse rankingResponse { get; set; }
}
public class WebPages
{
public string webSearchUrl { get; set; }
public int totalEstimatedMatches { get; set; }
public List<Value> value { get; set; }
}
public class Value
{
public string id { get; set; }
public string name { get; set; }
public string url { get; set; }
public List<About> about { get; set; }
public string displayUrl { get; set; }
public string snippet { get; set; }
public List<DeepLink> deepLinks { get; set; }
public string dateLastCrawled { get; set; }
public List<SearchTag> searchTags { get; set; }
}
public class About
{
public string name { get; set; }
}
public class DeepLink
{
public string name { get; set; }
public string url { get; set; }
public string snippet { get; set; }
}
public class SearchTag
{
public string name { get; set; }
public string content { get; set; }
}
public class Value2
{
public string text { get; set; }
public string displayText { get; set; }
public string webSearchUrl { get; set; }
}
public class RelatedSearches
{
public string id { get; set; }
public List<Value2> value { get; set; }
}
public class Value3
{
public string id { get; set; }
}
public class Item
{
public string answerType { get; set; }
public int resultIndex { get; set; }
public Value3 value { get; set; }
}
public class Mainline
{
public List<Item> items { get; set; }
}
public class RankingResponse
{
public Mainline mainline { get; set; }
}
}

RestSharp - WP7 - Cannot deserialize XML to a list

I use RestSharp in my Windows Phone 7.1 project.
I have a response in XML format here:
https://skydrive.live.com/redir.aspx?cid=0b39f4fbbb0489dd&resid=B39F4FBBB0489DD!139&parid=B39F4FBBB0489DD!103&authkey=!AOdT-FiS6Mw8v5Y
I tried to deserialize that response to a class:
public class fullWall
{
public _user user { get; set; }
public int numberOfFriend { get; set; }
public int numberOfPhoto { get; set; }
public List<timhotPhotos> timhotPhotos { get; set; }
public fullWall()
{
timhotPhotos = new List<timhotPhotos>();
}
}
All properties are ok except the timhotPhotos list, as you can see here:
timhotPhotos class:
public class timhotPhotos
{
public string id { get; set; }
public string title { get; set; }
public string description { get; set; }
public string url { get; set; }
public double width { get; set; }
public double height { get; set; }
public DateTime createdDate { get; set; }
public _user user { get; set; }
public int numOfComment { get; set; }
public int numOfRate { get; set; }
public int numOfView { get; set; }
public bool rated { get; set; }
}
Where am I wrong?
You'll have to change the default XML deserializer to the DotNetXmlDeserializer, like this:
RestClient client;
client.AddHandler("application/xml", new DotNetXmlDeserializer());
Then, add the XmlElement attribute to the List<timhotPhotos> timhotPhotos property like this:
public class fullWall
{
public _user user { get; set; }
public int numberOfFriend { get; set; }
public int numberOfPhoto { get; set; }
[System.Xml.Serialization.XmlElement()]
public List<timhotPhotos> timhotPhotos { get; set; }
public fullWall()
{
timhotPhotos = new List<timhotPhotos>();
}
}
Now it should work fine!

Resources