• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
A

Andrey Spencer

@Andrey Spencer
About
Posts
2
Topics
1
Groups
0
Followers
0
Following
1

Topics

  • A

    Deserializing the JSON matchState into a custom object

    Scheduled Pinned Locked Moved Unsolved General
    2
    0 Votes
    2 Posts
    254 Views
    Franco LagoF

    Hello Andrey and thank you for your inquiry,

    For an approach like this I would recommend grabbing the matchState as a Dictionary<string,object> and then making a new instance of JsonMatchState and filling in each field one at a time.

    An example of this would look like to get one of the fields:

    JsonMatchState matchState = new JsonMatchState(); var matchState = data["matchState"] as Dictionary<string, object>; matchState.turnNumber = (int) matchState["turnNumber"];

    Hope this helps and please let us know if you have further questions or inquiries about this.

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users