Users items = JsonConvert.DeserializeObject<Users>(json); dgTasks.DataSource = items.users;So that works well for the Users.json file, but I don't like the idea to write it separately for each table. Is there a way to use Users dynamically, so either I read the class name from the Json file itself or extract it from the json file name, but at least I don't need to have a case statement here?
Like in VFP it would be something like JsonConvert.DeserializeObject<&lctablename>(json);