-
Request URL:http://www.jiayuan.com/msg/outbox/list.php
-
Request Method:POST
form data:
- type=all&page=1
- --------------------------------------------------------------
pasting
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Newtonsoft.Json;
namespace wgscd
{
/// <summary>
/// Interaction logic for TestWindow1.xaml
/// </summary>
public partial class TestWindow1 : Window
{
public TestWindow1()
{
InitializeComponent();
listData = new List<string>();
listData = GetData();
list.ItemsSource = listData;
}
List<string> listData;
public List<string> GetData()
{
List<string> listUser = new List<string>();
InboxData d = JsonConvert.DeserializeObject<InboxData>(Properties.Resources.json);
foreach (var u in d.data)
{
listUser.Add(u.desc);
string uid = u.uid;
string age = u.desc.Substring(0, 2);
string from = u.desc.Split(",".ToCharArray())[2];
}
return listUser;
}
}
public class InboxData
{
public string recode { get; set; }
public string total { get; set; }
public Data[] data { get; set; }
}
public class Data
{
public string uid { get; set; }
public string nickname { get; set; }
public string sex { get; set; }
public string desc { get; set; }
}
}