I have to serialize/deserialize a class into a JSON string/and return. The JSON Strinig must contain the "error" string (like: {error:"something strange occoured", id:23, result:"xxxxx"}), which specifies the occoured error.
How can i implement a class like:
Public Class JsonResponse
Public result As JsonResult
Public error As String
Public id As Integer
End Class
If i do this, the word 'error' is invalid.
Thanks
Surround it with square brackets
Public Class JsonResponse
Public result As JsonResult
Public [error] As String
Public id As Integer
End Class
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With