Object empty on conversion from json to vb.net classes
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have this json that I want to convert to vb.net objects and I've tried to create classes for it without success. The json resonse looks like below:
{
"status": "success",
"result": {
"0": {
"id": 4991,
"sender_id": 2971,
"due_date": "0000-00-00 00:00:00",
"language_id": "sv",
"last_event": "2017-05-17 09:58:38",
"visible_name": "new offer",
"name": "new offer",
"reminder_date": "0000-00-00",
"offer_status": 0,
"offer_type": 1,
"user_details": "{"first_name":"Beta","last_name":"","company":"Simplesign","email":"beta@yopmail.com","reg_no":"","address":"","telephone":"00923453596885","post_code":"","city":""}",
"unique_id": "591c02ae8c442",
"created_date": "2017-05-17 09:58:38",
"signed_date": "0000-00-00 00:00:00",
"last_sent_emailreminder": "0000-00-00 00:00:00",
"last_sent_smsreminder": "0000-00-00 00:00:00",
"unread_notification": 0,
"offer_rejected": 0,
"recieved_by": 0,
"pdf_url": "https://esign.simplesign.io/avtal/downloadpdf/4991/5b8648da173a5",
"details": [
{
"id": 5668,
"offer_sent_id": 4991,
"customer_id": 1556,
"offer_status": 1,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "0000-00-00 00:00:00",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "",
"gps_location": "",
"first_name": "John",
"last_name": "Doe",
"company": "",
"is_sender": 0,
"extra_fields": "",
"user_details": "{"id":1556,"full_name":"John","email":"johndoe@yopmail.com","company":"","reg_no":"","mobile":"","address":"","city":"","zipcode":"","country":"","extra_fields":"","invitation_order":1,"confirmation":1,"role":1,"id_attachment":0,"authentication":1,"paypal_amount":0,"invitation_type":1}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "johndoe@yopmail.com",
"unique_id": "591c02d30379f",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 1,
"role": 1,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 1,
"invitation_type": 1,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
],
"senderDetails": [
{
"id": 5667,
"offer_sent_id": 4991,
"customer_id": 0,
"offer_status": 4,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "2017-05-17 09:59:15",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "103.75.244.108",
"gps_location": "",
"first_name": "Beta",
"last_name": "",
"company": "Simplesign",
"is_sender": 1,
"extra_fields": "",
"user_details": "{"id":2971,"full_name":"Beta","company":"Simplesign","address":"","country":"","zipcode":"","city":"","reg_no":"","email":"beta@yopmail.com"}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "beta@yopmail.com",
"unique_id": "591c02d3018d0",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 0,
"role": 0,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 0,
"invitation_type": 0,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
]
},
"userSetting": {
"userMsg": "",
"userSMS": "",
"userSubject": ""
},
"pagination": {
"totalRecords": 1,
"pagelimit": 10,
"currentpage": 0
}
},
"totaldata": {
"sent": 1,
"reviewed": 0,
"signed": 0,
"rejected": 0
}
}
The representation looks like this now:
Imports Microsoft.VisualBasic
Imports Newtonsoft.Json
Public Class RecipientDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("document_read_date")>
Public Property document_read_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("invitation_order")>
Public Property invitation_order As Integer
<JsonProperty("email")>
Public Property email As String
<JsonProperty("offer_confirmation")>
Public Property offer_confirmation As String
<JsonProperty("invitation_type")>
Public Property invitation_type As String
End Class
Public Class SenderDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("email")>
Public Property email As String
End Class
Public Class ContractDetail
<JsonProperty("sender_id")>
Public Property sender_id As Integer
<JsonProperty("last_event")>
Public Property last_event As String
<JsonProperty("visible_name")>
Public Property visible_name As String
<JsonProperty("offer_status")>
Public Property offer_status As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("created_date")>
Public Property created_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("offer_rejected")>
Public Property offer_rejected As String
<JsonProperty("name")>
Public Property name As String
<JsonProperty("contract_id")>
Public Property contract_id As Integer
<JsonProperty("recipientDetails")>
Public Property recipientDetails As IList(Of RecipientDetail)
<JsonProperty("pdf_url")>
Public Property pdf_url As String
<JsonProperty("senderDetails")>
Public Property senderDetails As IList(Of SenderDetail)
End Class
Public Class Pagination
<JsonProperty("totalRecords")>
Public Property totalRecords As Integer
<JsonProperty("pagelimit")>
Public Property pagelimit As Integer
<JsonProperty("currentpage")>
Public Property currentpage As Integer
End Class
Public Class Result
Public Property ContractDetail As IList(Of ContractDetail)
End Class
Public Class SS_History
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
End Class
The problem is that the result is empty, so for some reason it seems that I've done the result class wrong.
If someone have a suggestion of how to solve it I would be most grateful.
Peter
asp.net .net json vb.net
add a comment |
I have this json that I want to convert to vb.net objects and I've tried to create classes for it without success. The json resonse looks like below:
{
"status": "success",
"result": {
"0": {
"id": 4991,
"sender_id": 2971,
"due_date": "0000-00-00 00:00:00",
"language_id": "sv",
"last_event": "2017-05-17 09:58:38",
"visible_name": "new offer",
"name": "new offer",
"reminder_date": "0000-00-00",
"offer_status": 0,
"offer_type": 1,
"user_details": "{"first_name":"Beta","last_name":"","company":"Simplesign","email":"beta@yopmail.com","reg_no":"","address":"","telephone":"00923453596885","post_code":"","city":""}",
"unique_id": "591c02ae8c442",
"created_date": "2017-05-17 09:58:38",
"signed_date": "0000-00-00 00:00:00",
"last_sent_emailreminder": "0000-00-00 00:00:00",
"last_sent_smsreminder": "0000-00-00 00:00:00",
"unread_notification": 0,
"offer_rejected": 0,
"recieved_by": 0,
"pdf_url": "https://esign.simplesign.io/avtal/downloadpdf/4991/5b8648da173a5",
"details": [
{
"id": 5668,
"offer_sent_id": 4991,
"customer_id": 1556,
"offer_status": 1,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "0000-00-00 00:00:00",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "",
"gps_location": "",
"first_name": "John",
"last_name": "Doe",
"company": "",
"is_sender": 0,
"extra_fields": "",
"user_details": "{"id":1556,"full_name":"John","email":"johndoe@yopmail.com","company":"","reg_no":"","mobile":"","address":"","city":"","zipcode":"","country":"","extra_fields":"","invitation_order":1,"confirmation":1,"role":1,"id_attachment":0,"authentication":1,"paypal_amount":0,"invitation_type":1}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "johndoe@yopmail.com",
"unique_id": "591c02d30379f",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 1,
"role": 1,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 1,
"invitation_type": 1,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
],
"senderDetails": [
{
"id": 5667,
"offer_sent_id": 4991,
"customer_id": 0,
"offer_status": 4,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "2017-05-17 09:59:15",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "103.75.244.108",
"gps_location": "",
"first_name": "Beta",
"last_name": "",
"company": "Simplesign",
"is_sender": 1,
"extra_fields": "",
"user_details": "{"id":2971,"full_name":"Beta","company":"Simplesign","address":"","country":"","zipcode":"","city":"","reg_no":"","email":"beta@yopmail.com"}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "beta@yopmail.com",
"unique_id": "591c02d3018d0",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 0,
"role": 0,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 0,
"invitation_type": 0,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
]
},
"userSetting": {
"userMsg": "",
"userSMS": "",
"userSubject": ""
},
"pagination": {
"totalRecords": 1,
"pagelimit": 10,
"currentpage": 0
}
},
"totaldata": {
"sent": 1,
"reviewed": 0,
"signed": 0,
"rejected": 0
}
}
The representation looks like this now:
Imports Microsoft.VisualBasic
Imports Newtonsoft.Json
Public Class RecipientDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("document_read_date")>
Public Property document_read_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("invitation_order")>
Public Property invitation_order As Integer
<JsonProperty("email")>
Public Property email As String
<JsonProperty("offer_confirmation")>
Public Property offer_confirmation As String
<JsonProperty("invitation_type")>
Public Property invitation_type As String
End Class
Public Class SenderDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("email")>
Public Property email As String
End Class
Public Class ContractDetail
<JsonProperty("sender_id")>
Public Property sender_id As Integer
<JsonProperty("last_event")>
Public Property last_event As String
<JsonProperty("visible_name")>
Public Property visible_name As String
<JsonProperty("offer_status")>
Public Property offer_status As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("created_date")>
Public Property created_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("offer_rejected")>
Public Property offer_rejected As String
<JsonProperty("name")>
Public Property name As String
<JsonProperty("contract_id")>
Public Property contract_id As Integer
<JsonProperty("recipientDetails")>
Public Property recipientDetails As IList(Of RecipientDetail)
<JsonProperty("pdf_url")>
Public Property pdf_url As String
<JsonProperty("senderDetails")>
Public Property senderDetails As IList(Of SenderDetail)
End Class
Public Class Pagination
<JsonProperty("totalRecords")>
Public Property totalRecords As Integer
<JsonProperty("pagelimit")>
Public Property pagelimit As Integer
<JsonProperty("currentpage")>
Public Property currentpage As Integer
End Class
Public Class Result
Public Property ContractDetail As IList(Of ContractDetail)
End Class
Public Class SS_History
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
End Class
The problem is that the result is empty, so for some reason it seems that I've done the result class wrong.
If someone have a suggestion of how to solve it I would be most grateful.
Peter
asp.net .net json vb.net
add a comment |
I have this json that I want to convert to vb.net objects and I've tried to create classes for it without success. The json resonse looks like below:
{
"status": "success",
"result": {
"0": {
"id": 4991,
"sender_id": 2971,
"due_date": "0000-00-00 00:00:00",
"language_id": "sv",
"last_event": "2017-05-17 09:58:38",
"visible_name": "new offer",
"name": "new offer",
"reminder_date": "0000-00-00",
"offer_status": 0,
"offer_type": 1,
"user_details": "{"first_name":"Beta","last_name":"","company":"Simplesign","email":"beta@yopmail.com","reg_no":"","address":"","telephone":"00923453596885","post_code":"","city":""}",
"unique_id": "591c02ae8c442",
"created_date": "2017-05-17 09:58:38",
"signed_date": "0000-00-00 00:00:00",
"last_sent_emailreminder": "0000-00-00 00:00:00",
"last_sent_smsreminder": "0000-00-00 00:00:00",
"unread_notification": 0,
"offer_rejected": 0,
"recieved_by": 0,
"pdf_url": "https://esign.simplesign.io/avtal/downloadpdf/4991/5b8648da173a5",
"details": [
{
"id": 5668,
"offer_sent_id": 4991,
"customer_id": 1556,
"offer_status": 1,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "0000-00-00 00:00:00",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "",
"gps_location": "",
"first_name": "John",
"last_name": "Doe",
"company": "",
"is_sender": 0,
"extra_fields": "",
"user_details": "{"id":1556,"full_name":"John","email":"johndoe@yopmail.com","company":"","reg_no":"","mobile":"","address":"","city":"","zipcode":"","country":"","extra_fields":"","invitation_order":1,"confirmation":1,"role":1,"id_attachment":0,"authentication":1,"paypal_amount":0,"invitation_type":1}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "johndoe@yopmail.com",
"unique_id": "591c02d30379f",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 1,
"role": 1,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 1,
"invitation_type": 1,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
],
"senderDetails": [
{
"id": 5667,
"offer_sent_id": 4991,
"customer_id": 0,
"offer_status": 4,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "2017-05-17 09:59:15",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "103.75.244.108",
"gps_location": "",
"first_name": "Beta",
"last_name": "",
"company": "Simplesign",
"is_sender": 1,
"extra_fields": "",
"user_details": "{"id":2971,"full_name":"Beta","company":"Simplesign","address":"","country":"","zipcode":"","city":"","reg_no":"","email":"beta@yopmail.com"}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "beta@yopmail.com",
"unique_id": "591c02d3018d0",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 0,
"role": 0,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 0,
"invitation_type": 0,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
]
},
"userSetting": {
"userMsg": "",
"userSMS": "",
"userSubject": ""
},
"pagination": {
"totalRecords": 1,
"pagelimit": 10,
"currentpage": 0
}
},
"totaldata": {
"sent": 1,
"reviewed": 0,
"signed": 0,
"rejected": 0
}
}
The representation looks like this now:
Imports Microsoft.VisualBasic
Imports Newtonsoft.Json
Public Class RecipientDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("document_read_date")>
Public Property document_read_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("invitation_order")>
Public Property invitation_order As Integer
<JsonProperty("email")>
Public Property email As String
<JsonProperty("offer_confirmation")>
Public Property offer_confirmation As String
<JsonProperty("invitation_type")>
Public Property invitation_type As String
End Class
Public Class SenderDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("email")>
Public Property email As String
End Class
Public Class ContractDetail
<JsonProperty("sender_id")>
Public Property sender_id As Integer
<JsonProperty("last_event")>
Public Property last_event As String
<JsonProperty("visible_name")>
Public Property visible_name As String
<JsonProperty("offer_status")>
Public Property offer_status As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("created_date")>
Public Property created_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("offer_rejected")>
Public Property offer_rejected As String
<JsonProperty("name")>
Public Property name As String
<JsonProperty("contract_id")>
Public Property contract_id As Integer
<JsonProperty("recipientDetails")>
Public Property recipientDetails As IList(Of RecipientDetail)
<JsonProperty("pdf_url")>
Public Property pdf_url As String
<JsonProperty("senderDetails")>
Public Property senderDetails As IList(Of SenderDetail)
End Class
Public Class Pagination
<JsonProperty("totalRecords")>
Public Property totalRecords As Integer
<JsonProperty("pagelimit")>
Public Property pagelimit As Integer
<JsonProperty("currentpage")>
Public Property currentpage As Integer
End Class
Public Class Result
Public Property ContractDetail As IList(Of ContractDetail)
End Class
Public Class SS_History
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
End Class
The problem is that the result is empty, so for some reason it seems that I've done the result class wrong.
If someone have a suggestion of how to solve it I would be most grateful.
Peter
asp.net .net json vb.net
I have this json that I want to convert to vb.net objects and I've tried to create classes for it without success. The json resonse looks like below:
{
"status": "success",
"result": {
"0": {
"id": 4991,
"sender_id": 2971,
"due_date": "0000-00-00 00:00:00",
"language_id": "sv",
"last_event": "2017-05-17 09:58:38",
"visible_name": "new offer",
"name": "new offer",
"reminder_date": "0000-00-00",
"offer_status": 0,
"offer_type": 1,
"user_details": "{"first_name":"Beta","last_name":"","company":"Simplesign","email":"beta@yopmail.com","reg_no":"","address":"","telephone":"00923453596885","post_code":"","city":""}",
"unique_id": "591c02ae8c442",
"created_date": "2017-05-17 09:58:38",
"signed_date": "0000-00-00 00:00:00",
"last_sent_emailreminder": "0000-00-00 00:00:00",
"last_sent_smsreminder": "0000-00-00 00:00:00",
"unread_notification": 0,
"offer_rejected": 0,
"recieved_by": 0,
"pdf_url": "https://esign.simplesign.io/avtal/downloadpdf/4991/5b8648da173a5",
"details": [
{
"id": 5668,
"offer_sent_id": 4991,
"customer_id": 1556,
"offer_status": 1,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "0000-00-00 00:00:00",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "",
"gps_location": "",
"first_name": "John",
"last_name": "Doe",
"company": "",
"is_sender": 0,
"extra_fields": "",
"user_details": "{"id":1556,"full_name":"John","email":"johndoe@yopmail.com","company":"","reg_no":"","mobile":"","address":"","city":"","zipcode":"","country":"","extra_fields":"","invitation_order":1,"confirmation":1,"role":1,"id_attachment":0,"authentication":1,"paypal_amount":0,"invitation_type":1}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "johndoe@yopmail.com",
"unique_id": "591c02d30379f",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 1,
"role": 1,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 1,
"invitation_type": 1,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
],
"senderDetails": [
{
"id": 5667,
"offer_sent_id": 4991,
"customer_id": 0,
"offer_status": 4,
"sent_date": "2017-05-17 09:59:15",
"email_read_date": "0000-00-00 00:00:00",
"document_read_date": "0000-00-00 00:00:00",
"signed_date": "2017-05-17 09:59:15",
"reject_date": "0000-00-00 00:00:00",
"sender_ip": "103.75.244.108",
"read_ip": "",
"signed_ip": "103.75.244.108",
"gps_location": "",
"first_name": "Beta",
"last_name": "",
"company": "Simplesign",
"is_sender": 1,
"extra_fields": "",
"user_details": "{"id":2971,"full_name":"Beta","company":"Simplesign","address":"","country":"","zipcode":"","city":"","reg_no":"","email":"beta@yopmail.com"}",
"request_attachment": "",
"pin_code": 0,
"invitation_order": 1,
"email": "beta@yopmail.com",
"unique_id": "591c02d3018d0",
"signature": "",
"signature_type": "",
"signature_font": "",
"authentication_method": 0,
"role": 0,
"id_attachments": 0,
"paypal_amount": 0,
"offer_confirmation": 0,
"invitation_type": 0,
"attached_id": "",
"signature_image": "",
"recieved_by": 0,
"req_attached": "",
"is_pending": 0,
"schedule": "",
"schedule_userid": "",
"isretargeting": 1,
"signature_contrast": "",
"device_details": "",
"evidence_data": "",
"bankid_data": ""
}
]
},
"userSetting": {
"userMsg": "",
"userSMS": "",
"userSubject": ""
},
"pagination": {
"totalRecords": 1,
"pagelimit": 10,
"currentpage": 0
}
},
"totaldata": {
"sent": 1,
"reviewed": 0,
"signed": 0,
"rejected": 0
}
}
The representation looks like this now:
Imports Microsoft.VisualBasic
Imports Newtonsoft.Json
Public Class RecipientDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("document_read_date")>
Public Property document_read_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("invitation_order")>
Public Property invitation_order As Integer
<JsonProperty("email")>
Public Property email As String
<JsonProperty("offer_confirmation")>
Public Property offer_confirmation As String
<JsonProperty("invitation_type")>
Public Property invitation_type As String
End Class
Public Class SenderDetail
<JsonProperty("id")>
Public Property id As Integer
<JsonProperty("customer_id")>
Public Property customer_id As Integer
<JsonProperty("sent_date")>
Public Property sent_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("first_name")>
Public Property first_name As String
<JsonProperty("company")>
Public Property company As String
<JsonProperty("is_sender")>
Public Property is_sender As String
<JsonProperty("extra_fields")>
Public Property extra_fields As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("email")>
Public Property email As String
End Class
Public Class ContractDetail
<JsonProperty("sender_id")>
Public Property sender_id As Integer
<JsonProperty("last_event")>
Public Property last_event As String
<JsonProperty("visible_name")>
Public Property visible_name As String
<JsonProperty("offer_status")>
Public Property offer_status As String
<JsonProperty("user_details")>
Public Property user_details As String
<JsonProperty("created_date")>
Public Property created_date As String
<JsonProperty("signed_date")>
Public Property signed_date As String
<JsonProperty("offer_rejected")>
Public Property offer_rejected As String
<JsonProperty("name")>
Public Property name As String
<JsonProperty("contract_id")>
Public Property contract_id As Integer
<JsonProperty("recipientDetails")>
Public Property recipientDetails As IList(Of RecipientDetail)
<JsonProperty("pdf_url")>
Public Property pdf_url As String
<JsonProperty("senderDetails")>
Public Property senderDetails As IList(Of SenderDetail)
End Class
Public Class Pagination
<JsonProperty("totalRecords")>
Public Property totalRecords As Integer
<JsonProperty("pagelimit")>
Public Property pagelimit As Integer
<JsonProperty("currentpage")>
Public Property currentpage As Integer
End Class
Public Class Result
Public Property ContractDetail As IList(Of ContractDetail)
End Class
Public Class SS_History
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
End Class
The problem is that the result is empty, so for some reason it seems that I've done the result class wrong.
If someone have a suggestion of how to solve it I would be most grateful.
Peter
asp.net .net json vb.net
asp.net .net json vb.net
asked Jan 3 at 16:19
PettanordPettanord
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
At first, copy the json string.
Open VS, add a new empty class.
Select Edit on VS menu, then Paste Special and Paste Json as Classes. Class will be generated automaticaly.
The first object will be the RootObject, on that one, add Newtonsoft's decorator.
After you added all decorators, you as well can change property names or object names.
Imports Newtonsoft.Json
Public Class Rootobject
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
<JsonProperty("totaldata")>
Public Property totaldata As Totaldata
End Class
etc..
Deserialize it this way:
Json
Hi and thanks for answer. Forgive my ignorance, but how do I access the Quick Watch window to be able to deserialize the way you showed in the image?
– Pettanord
Jan 4 at 8:34
You can do it by adding brakepoint on debug mode. When the debugger hits the brakepoint, use mouse's right click (to expand option menu) and you'll find quick watch window. Or otherwise you should find the same functionality on debug menu, or by using button combination of shift + f9.
– Nicoleta Andreea Soare
Jan 16 at 9:32
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54026076%2fobject-empty-on-conversion-from-json-to-vb-net-classes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
At first, copy the json string.
Open VS, add a new empty class.
Select Edit on VS menu, then Paste Special and Paste Json as Classes. Class will be generated automaticaly.
The first object will be the RootObject, on that one, add Newtonsoft's decorator.
After you added all decorators, you as well can change property names or object names.
Imports Newtonsoft.Json
Public Class Rootobject
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
<JsonProperty("totaldata")>
Public Property totaldata As Totaldata
End Class
etc..
Deserialize it this way:
Json
Hi and thanks for answer. Forgive my ignorance, but how do I access the Quick Watch window to be able to deserialize the way you showed in the image?
– Pettanord
Jan 4 at 8:34
You can do it by adding brakepoint on debug mode. When the debugger hits the brakepoint, use mouse's right click (to expand option menu) and you'll find quick watch window. Or otherwise you should find the same functionality on debug menu, or by using button combination of shift + f9.
– Nicoleta Andreea Soare
Jan 16 at 9:32
add a comment |
At first, copy the json string.
Open VS, add a new empty class.
Select Edit on VS menu, then Paste Special and Paste Json as Classes. Class will be generated automaticaly.
The first object will be the RootObject, on that one, add Newtonsoft's decorator.
After you added all decorators, you as well can change property names or object names.
Imports Newtonsoft.Json
Public Class Rootobject
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
<JsonProperty("totaldata")>
Public Property totaldata As Totaldata
End Class
etc..
Deserialize it this way:
Json
Hi and thanks for answer. Forgive my ignorance, but how do I access the Quick Watch window to be able to deserialize the way you showed in the image?
– Pettanord
Jan 4 at 8:34
You can do it by adding brakepoint on debug mode. When the debugger hits the brakepoint, use mouse's right click (to expand option menu) and you'll find quick watch window. Or otherwise you should find the same functionality on debug menu, or by using button combination of shift + f9.
– Nicoleta Andreea Soare
Jan 16 at 9:32
add a comment |
At first, copy the json string.
Open VS, add a new empty class.
Select Edit on VS menu, then Paste Special and Paste Json as Classes. Class will be generated automaticaly.
The first object will be the RootObject, on that one, add Newtonsoft's decorator.
After you added all decorators, you as well can change property names or object names.
Imports Newtonsoft.Json
Public Class Rootobject
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
<JsonProperty("totaldata")>
Public Property totaldata As Totaldata
End Class
etc..
Deserialize it this way:
Json
At first, copy the json string.
Open VS, add a new empty class.
Select Edit on VS menu, then Paste Special and Paste Json as Classes. Class will be generated automaticaly.
The first object will be the RootObject, on that one, add Newtonsoft's decorator.
After you added all decorators, you as well can change property names or object names.
Imports Newtonsoft.Json
Public Class Rootobject
<JsonProperty("status")>
Public Property status As String
<JsonProperty("result")>
Public Property result As Result
<JsonProperty("totaldata")>
Public Property totaldata As Totaldata
End Class
etc..
Deserialize it this way:
Json
answered Jan 3 at 16:42
Nicoleta Andreea SoareNicoleta Andreea Soare
1
1
Hi and thanks for answer. Forgive my ignorance, but how do I access the Quick Watch window to be able to deserialize the way you showed in the image?
– Pettanord
Jan 4 at 8:34
You can do it by adding brakepoint on debug mode. When the debugger hits the brakepoint, use mouse's right click (to expand option menu) and you'll find quick watch window. Or otherwise you should find the same functionality on debug menu, or by using button combination of shift + f9.
– Nicoleta Andreea Soare
Jan 16 at 9:32
add a comment |
Hi and thanks for answer. Forgive my ignorance, but how do I access the Quick Watch window to be able to deserialize the way you showed in the image?
– Pettanord
Jan 4 at 8:34
You can do it by adding brakepoint on debug mode. When the debugger hits the brakepoint, use mouse's right click (to expand option menu) and you'll find quick watch window. Or otherwise you should find the same functionality on debug menu, or by using button combination of shift + f9.
– Nicoleta Andreea Soare
Jan 16 at 9:32
Hi and thanks for answer. Forgive my ignorance, but how do I access the Quick Watch window to be able to deserialize the way you showed in the image?
– Pettanord
Jan 4 at 8:34
Hi and thanks for answer. Forgive my ignorance, but how do I access the Quick Watch window to be able to deserialize the way you showed in the image?
– Pettanord
Jan 4 at 8:34
You can do it by adding brakepoint on debug mode. When the debugger hits the brakepoint, use mouse's right click (to expand option menu) and you'll find quick watch window. Or otherwise you should find the same functionality on debug menu, or by using button combination of shift + f9.
– Nicoleta Andreea Soare
Jan 16 at 9:32
You can do it by adding brakepoint on debug mode. When the debugger hits the brakepoint, use mouse's right click (to expand option menu) and you'll find quick watch window. Or otherwise you should find the same functionality on debug menu, or by using button combination of shift + f9.
– Nicoleta Andreea Soare
Jan 16 at 9:32
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54026076%2fobject-empty-on-conversion-from-json-to-vb-net-classes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown