2017-02-23 2 views
0

{"inghost3r": { "id": 11832857, "name": "inGHost3r", "profileIconId": 26, "revisionDate": 1482010976000, "summonerLevel": 10 }}Wie JSON-Daten zu C# Modellklasse

Hallo, auf der Abbildung, wie kann ich das tun? Bitte helfen Sie mir

+0

Sie könnten einfach google - http://jsonutils.com/ –

+0

Blick auf http://stackoverflow.com/questions/2246694/how-to- convert-json-object-zu-custom-c-sharp-object –

+0

Danke für Ihren Kommentar aber, jsountils.com funktioniert nicht – user2800554

Antwort

0

Newtonsoft.Json mit:

public static object JsonToObject(string jsonString, object obj) 
    { 
     return JavaScriptConvert.DeserializeObject(jsonString, obj.GetType()); 
    } 
+0

Danke für den Kommentar, was obj? ist meine Modellklasse? – user2800554

Verwandte Themen