0

I am trying to serialize this class with Newtonsoft.JSON but the output always result in {} and I cannot find out why.
Is there something I have to add to this class? Shall I use something different from JsonConvert.SerializeObject()?


Namespace GestioneMail
    Public Class clsOrdine
        Dim Id As Int32
        Dim Ordine As String

        Public Sub New()

        End Sub

        Sub New(Id As Int32, Ordine As String)
            Me.Id = Id
            Me.Ordine = Ordine
        End Sub

        Public Shared Function GetOrdini() As List(Of clsOrdine)
            'do things
        End Function
    End Class
End Namespace

1 Answer 1

1

Id and Ordine should be declared as properties.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.