日期:2014-05-17 浏览次数:20622 次
{
"code": 200,
"status": "OK",
"result": "{\"0130513113839835855\":{\"PassengerID\":\"3f4124f7-e68d-400a-823f-f9eb506856a7\",\"PassengerName\":\"吉吉\",\"TicketNumber\":\"\"}}"
}
{
"code": 200,
"status": "OK",
"result": "{\"0130513113839835855\":{\"PassengerID\":\"3f4124f7-e68d-400a-823f-f9eb506856a7\",\"PassengerName\":\"吉吉\",\"TicketNumber\":\"\"}}"
}
result=
{
"0130513113839835855":{"PassengerID":"3f4124f7-e68d-400a-823f-f9eb506856a7","PassengerName":"吉吉","TicketNumber":""}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Dynamic;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var s = @"
{
""code"": 200,
""status"": ""OK"",
""result"": ""{\""0130513113839835855\"":{\""PassengerID\"":\""3f4124f7-e68d-400a-823f-f9eb506856a7\"",\""PassengerName\"":\""吉吉\"",\""TicketNumber\"":\""\""}}""
}";
dynamic a = JsonConvert.DeserializeObject<ExpandoObject>(s);
dynamic b = JsonConvert.DeserializeObject<ExpandoObject>(a.result);
var d = (IDictionary<string, object>)b;
Console.WriteLine("a.status={0}", a.status);