Why do you want to parse it when you could just deserialize it into objects?
Use contracts like so:
[DataContract]
public class Friend
{
[DataMember(Name = "name")]
public string Name { get; set; }
[DataMember(Name = "id")]
public string { get; set; }
}
[DataContract]
public partial class Paging
{
[DataMember(Name = "next")]
public string Next { get; set; }
}
[DataContract]
public partial class RootClass
{
[DataMember(Name = "data")]
public Friend[] Friends { get; set; }
[DataMember(Name = "paging")]
public Paging Paging { get; set; }
}
And use a json deserializer like the JSON.NET deserializer from
Newtonsoft, and deserialize like so:
var root = Newtonsoft.Json.JsonConvert.DeserializeObject(yourData,
typeof(RootClass));
No need to derrp around with your own parser here...
On Mon, Oct 8, 2012 at 3:46 PM, HemSingh <[email protected]> wrote:
> Hi,
>
> I am getting facebook friends list in the following format:
>
>
>
> How can I parse them with System.Json in
> I am able to parse the profile values of a user but not friends list.
>
> I have tried many options but not succeeded.
>
>
>
>
> -----
> Thanks & Regards,
> Hem Singh
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/parse-facebook-friend-list-in-josn-tp5712133.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> [email protected]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
--
Med Venlig Hilsen / With Best Regards
Tomasz Cielecki
http://ostebaronen.dk
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid