C#C
C#•16mo ago
Temporal Nightmare

JSON Parsing to TreeView

Hello. I'm still banging my head on my desk the past 2 days trying to read a .json file which has a "table" root, into a TreeView. You'd think it would be easy for a dumbass but nope. Please help 😦

I tried ChatGPT, I tried Google, MS Learn, etc and I am a loser somehow.

The example CharacterMapping.json file:

{
  "table": [
    {
      "id": 100,
      "character_path": 9155864901130912278,
      "attire_path": 5838515536658117378,
      "basemodel_mdl_path": 9608790949800725399,
      "basemodel_mtls_path": 16869767090390095004,
      "attire_mdl_path": 5619533544245612033,
      "attire_mtls_path": 3740595121255541638,
      "unk2": 30
    },
    {
      "id": 101,
      "character_path": 12279268510363823451,
      "attire_path": 16519486993216130268,
      "basemodel_mdl_path": 5133769854344942046,
      "basemodel_mtls_path": 8091982216995671175,
      "attire_mdl_path": 14803390407684558538,
      "attire_mtls_path": 239947156153590923,
      "unk2": 28
 },
    {
      "id": 101,
      "attire_num": 1,
      "character_path": 12279268510363823451,
      "attire_path": 15744211445203291278,
      "basemodel_mdl_path": 5133769854344942046,
      "basemodel_mtls_path": 8091982216995671175,
      "attire_mdl_path": 8186642687843084600,
      "attire_mtls_path": 9716164581340245505,
      "unk2": 28
    }
]
}


The source is here (FUCK GITHUB it keeps breaking)
Was this page helpful?