예제 #1
0
        public static MultiplayerSummary DeserializeJSON(JToken token)
        {
            MultiplayerSummary c = new MultiplayerSummary()
            {
                InMultiplayerSession = ((int)token.SelectToken("InMultiplayerSession") > 0),
                InParty = ((int)token.SelectToken("InParty") > 0)
            };

            return(c);
        }
예제 #2
0
 public static Person DeserializeJSON(JToken token)
 {
     Person p = new Person()
     {
         xuid = (string)token.SelectToken("xuid"),
         isFavorite = (bool)token.SelectToken("isFavorite"),
         isFollowingCaller = (bool)token.SelectToken("isFollowingCaller"),
         isFollowedByCaller = (bool)token.SelectToken("isFollowedByCaller"),
         isIdentityShared = (bool)token.SelectToken("isIdentityShared"),
         addedDateTimeUtc = (string)token.SelectToken("addedDateTimeUtc"),
         displayName = (string)token.SelectToken("displayName"),
         realName = (string)token.SelectToken("realName"),
         displayPicRaw = (string)token.SelectToken("displayPicRaw"),
         gamertag = (string)token.SelectToken("gamertag"),
         gamerScore = (string)token.SelectToken("gamerScore"),
         xboxOneRep = (string)token.SelectToken("xboxOneRep"),
         presenceState = (string)token.SelectToken("presenceState"),
         presenceText = (string)token.SelectToken("presenceText"),
         multiplayerSummary = MultiplayerSummary.DeserializeJSON(token.SelectToken("multiplayerSummary")),
         preferredColor = PreferredColor.DeserializeJSON(token.SelectToken("preferredColor"))
     };
     return p;
 }