I have a JSON string that I am trying to convert. I can get the main part but there are two elements which are arrays part of the main that are not populating when I run the Deserializtion.
Below is the data and the code
{"Links":[{"rel":"self","href":"company"}],"License":{"Resources":[{"Access":"Full","Name":"account"},{"Access":"Full","Name":"amenity"},{"Access":"Full","Name":"aponlinecontrol"},{"Access":"Full","Name":"aponlineuser"},{"Access":"Full","Name":"balance"},{"Access":"Full","Name":"bank"},{"Access":"Full","Name":"board"},{"Access":"Full","Name":"cashapplicationorder"},{"Access":"Full","Name":"charge"},{"Access":"Full","Name":"chargebatch"},{"Access":"Full","Name":"chargecode"},{"Access":"Full","Name":"chargeitem"},{"Access":"Full","Name":"check"},{"Access":"Full","Name":"communication"},{"Access":"Full","Name":"communicationbatch"},{"Access":"Full","Name":"community"},{"Access":"Full","Name":"company"},{"Access":"Full","Name":"contractor"},{"Access":"Full","Name":"email"},{"Access":"Full","Name":"emailqueue"},{"Access":"Full","Name":"factsheettype"},{"Access":"Full","Name":"flexvalue"},{"Access":"Full","Name":"general"},{"Access":"Full","Name":"insurance"},{"Access":"Full","Name":"invoice"},{"Access":"Full","Name":"journalentry"},{"Access":"Full","Name":"legal"},{"Access":"Full","Name":"messenger"},{"Access":"Full","Name":"note"},{"Access":"Full","Name":"officer"},{"Access":"Full","Name":"owner"},{"Access":"Full","Name":"partnership"},{"Access":"Full","Name":"property"},{"Access":"Full","Name":"receiptbatch"},{"Access":"Full","Name":"receiptitem"},{"Access":"Full","Name":"relationship"},{"Access":"Full","Name":"specialinfo"},{"Access":"Full","Name":"topsuser"},{"Access":"Full","Name":"vendor"},{"Access":"Full","Name":"ccr"},{"Access":"Full","Name":"ccraction"},{"Access":"Full","Name":"ccrcode"},{"Access":"Full","Name":"ccrstage"},{"Access":"Full","Name":"relationship"},{"Access":"Full","Name":"vehicle"},{"Access":"Full","Name":"visitor"},{"Access":"Full","Name":"poolpass"},{"Access":"Full","Name":"servicerequest"},{"Access":"Full","Name":"workorder"},{"Access":"Full","Name":"workorderauthorization"},{"Access":"Full","Name":"workordertype"}],"CommunityApiKey":[{"Active":true,"ApiKey":"EED88E61-1AB6-4184-B249-B5D2ADC1F1F3","CommunityID":"230","CommunityKey":16,"CommunityName":"Pointe South Mountain","CustomerName":"Client DAB"},{"Active":true,"ApiKey":"CC454116-8563-4CA9-A6EE-0DADE2CBE7BE","CommunityID":"SBY","CommunityKey":59,"CommunityName":"Southbay Yacht & Racquet Club","CustomerName":"Client DAB"},{"Active":true,"ApiKey":"6803BDDD-8B1F-48E5-B75D-79D8896D4903","CommunityID":"XX","CommunityKey":72,"CommunityName":"Sample Condominium","CustomerName":"Client DAB"}],"PartnerServices":[]},"Address1":"PO BOX 12532","Address2":"","City":"Tempe","Contact":"David Black","Email1":"","Email2":"","Fax1":"","Fax2":"","Name":"Black and Associates LLC","Phone1":"602-509-6217","Phone2":"","State":"AZ","UtcOffset":null,"Zip":"85284","Metadata":{}}
CODE;
Public json As String
Public Class License
Public Property Resources As List(Of Resrcs)
Public Property CommunityApiKey As List(Of CommApiKeys)
Public Property Address1 As String
Public Property Address2 As String
Public Property City As String
Public Property Contact As String
Public Property Email1 As String
Public Property Email2 As String
Public Property Fax1 As String
Public Property Fax2 As String
Public Property Name As String
Public Property Phone1 As String
Public Property Phone2 As String
Public Property State As String
Public Property UtcOffset As Nullable(Of Long)
Public Property Zip As String
End Class
Public Class Resrcs
Public Property Access() As String
Public Property Name() As String
End Class
Public Class CommApiKeys
Public Property Active() As Boolean
Public Property ApiKey() As String
Public Property CommunityID() As String
Public Property CommunityKey() As Long
Public Property CommunityName() As String
Public Property CustomerName() As String
End Class
Dim company = Newtonsoft.Json.JsonConvert.DeserializeObject(Of License)(json)
What I have tried:
I have tried a couple different forms of deserialization but none of them seem to work. I have other JSON data with similar format and they work ok.