2017-03-08 36 views
0

我有這個類似JSON的字符串。Json.NET序列化多個不在數組中的對象

{ 
    "62": { 
    "unit_id": "431", 
    "staff_id": "444", 
    "ext_id": "0", 
    "barcode": "1", 
    "currency": "EUR", 
    "amount": "163.27", 
    "status": "Won", 
    "won": "43.27", 
    "jackpot": "120.00" 
    }, 
    "63": { 
    "unit_id": "432", 
    "staff_id": "445", 
    "ext_id": "0", 
    "barcode": "258765424", 
    "currency": "EUR", 
    "amount": "0.00", 
    "status": "Lost", 
    "won": "0.00", 
    "jackpot": "0.00" 
    } 
} 

我想序列化每個屬性「62」,「63」到模型。

回答

0

我找到了。我使用JObject.Parse(json),然後我可以迭代ChildrenTokens屬性。