2017-03-08 15 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属性。