Guest User

Guest User

  • Tech Writer
  • 2
  • 645

How can I deserialise JSON into C# objects

Jan 25 2023 1:01 PM

Can anyone help me with how I should code a c# model to so that I deserialise JSON from a webservice - I thought this would be quick and easy but the JSON is trickier than I expected - when I paste the sample JSON into visual studio and do a paste special > generate class from JSON the resulting class contains objects that are actually the name of the category id's  themselves.....can anyone shed any light on how I can structure the model to deserialise the JSON into so that I can get the categories into an IEnumerable of category types ....here is an example of the JSON.....

category — Checkfront API 3.0 documentation

any help gratefully received!


Answers (3)