How to create vb.net object class from json file (or xml file)

后端 未结 2 1736
说谎
说谎 2020-12-03 23:12

I\'m wondering how to create a objet class from json file or xml file ?

example :

I get this json file from webservice :

{\"nid\":\"3798\",\"         


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 00:08

    You can convert json to csharp using (http://json2csharp.com/) and then convert csharp code to vb.net using http://www.developerfusion.com/tools/convert/csharp-to-vb/. For deserialization you can use Newtonsoft.Json. Your deserialization code will be :

    JsonConvert.DeserializeObject(Of YourClass)()
    

提交回复
热议问题