Deserialize Json string to Visual Basic class

1

I have had problems creating a class like this for this JSON string. I ask for your help with this serialization and deserialization of JSON because I searched but I still get an error when deserializar.

JSON:

{
    "Local": "1",
    "CodProceso": "0000",
    "CodInterno": "1800000053",
    "CodExterno": "",
    "Mensaje": "Creado Correctamente",
    "ProductosErrados": ["", "", "", ""]
}

Class for JSON:

public Class mijson
    Public Local As String
    Public CodProceso As String
    Public CodInterno As String
    Public CodExterno As String
    Public Mensaje As String
    Public ProductosErrados() As String
end Class

I do not know if ProductosErrados is well declared because the error is not specific.

This is where I get the error:

dim rpta miclasejson = Newtonsoft.Json.JsonConvert.DeserializeObject(Of miclasejson)(strRes)
    
asked by jimmy cusi 18.05.2018 в 01:35
source

0 answers