Zimbug4
asked on
JSON to VB.bet class using Json deserialyze is giving an error.
I am trying to get a json to vb.net class.
I have used the Visual studio converter for this and generated the class, but it is not working.
The commented ' Public Property Wlisting() As WooData does not work,
I have tried different methods of calling an array or a list but always get the same error. The Json that come over appears correctly formed, it is the inability to get it into a class which is the problem.
The line :
Dim WooResponse = JsonConvert.DeserializeObj ect(Of WooCommerceData.Results)(r esult)
gives the following error:
Newtonsoft.Json.JsonSerial izationExc eption: 'Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Zetsy.WooCommerceData.Res ults' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Zit appears I should be calling this as a differnt type of list, but what I have tried gives the same error
========================== ========== ========== ========== ========== =======
The class is the following:
Namespace WooCommerceData
Public Class Results
Public Property Wlistings As List(Of WooData)
' Public Property Wlisting() As WooData
End Class
Public Class WooData
Public Property id As Integer
Public Property name As String
Public Property slug As String
Public Property permalink As String
Public Property date_created As Date
Public Property date_created_gmt As Date
Public Property date_modified As Date
Public Property date_modified_gmt As Date
Public Property type As String
Public Property status As String
Public Property featured As Boolean
Public Property catalog_visibility As String
Public Property description As String
Public Property short_description As String
Public Property sku As String
Public Property price As String
Public Property regular_price As String
Public Property sale_price As String
Public Property date_on_sale_from As Object
Public Property date_on_sale_from_gmt As Object
Public Property date_on_sale_to As Object
Public Property date_on_sale_to_gmt As Object
Public Property price_html As String
Public Property on_sale As Boolean
Public Property purchasable As Boolean
Public Property total_sales As Integer
Public Property virtual As Boolean
Public Property downloadable As Boolean
Public Property downloads() As Object
Public Property download_limit As Integer
Public Property download_expiry As Integer
Public Property external_url As String
Public Property button_text As String
Public Property tax_status As String
Public Property tax_class As String
Public Property manage_stock As Boolean
Public Property stock_quantity As Integer
Public Property in_stock As Boolean
Public Property backorders As String
Public Property backorders_allowed As Boolean
Public Property backordered As Boolean
Public Property sold_individually As Boolean
Public Property weight As String
Public Property dimensions As Dimensions
Public Property shipping_required As Boolean
Public Property shipping_taxable As Boolean
Public Property shipping_class As String
Public Property shipping_class_id As Integer
Public Property reviews_allowed As Boolean
Public Property average_rating As String
Public Property rating_count As Integer
Public Property related_ids() As Integer
Public Property upsell_ids() As Object
Public Property cross_sell_ids() As Object
Public Property parent_id As Integer
Public Property purchase_note As String
Public Property categories() As Category
Public Property tags() As Tag
Public Property images() As Image
Public Property attributes() As Object
Public Property default_attributes() As Object
Public Property variations() As Object
Public Property grouped_products() As Object
Public Property menu_order As Integer
Public Property meta_data() As Meta_Data
Public Property _links As _Links
End Class
Public Class Dimensions
Public Property length As String
Public Property width As String
Public Property height As String
End Class
Public Class _Links
Public Property self() As Self
Public Property collection() As Collection
End Class
Public Class Self
Public Property href As String
End Class
Public Class Collection
Public Property href As String
End Class
Public Class Category
Public Property id As Integer
Public Property name As String
Public Property slug As String
End Class
Public Class Tag
Public Property id As Integer
Public Property name As String
Public Property slug As String
End Class
Public Class Image
Public Property id As Integer
Public Property date_created As Date
Public Property date_created_gmt As Date
Public Property date_modified As Date
Public Property date_modified_gmt As Date
Public Property src As String
Public Property name As String
Public Property alt As String
Public Property position As Integer
End Class
Public Class Meta_Data
Public Property id As Integer
Public Property key As String
Public Property value As Object
End Class
End Namespace
I have used the Visual studio converter for this and generated the class, but it is not working.
The commented ' Public Property Wlisting() As WooData does not work,
I have tried different methods of calling an array or a list but always get the same error. The Json that come over appears correctly formed, it is the inability to get it into a class which is the problem.
The line :
Dim WooResponse = JsonConvert.DeserializeObj
gives the following error:
Newtonsoft.Json.JsonSerial
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Zit appears I should be calling this as a differnt type of list, but what I have tried gives the same error
==========================
The class is the following:
Namespace WooCommerceData
Public Class Results
Public Property Wlistings As List(Of WooData)
' Public Property Wlisting() As WooData
End Class
Public Class WooData
Public Property id As Integer
Public Property name As String
Public Property slug As String
Public Property permalink As String
Public Property date_created As Date
Public Property date_created_gmt As Date
Public Property date_modified As Date
Public Property date_modified_gmt As Date
Public Property type As String
Public Property status As String
Public Property featured As Boolean
Public Property catalog_visibility As String
Public Property description As String
Public Property short_description As String
Public Property sku As String
Public Property price As String
Public Property regular_price As String
Public Property sale_price As String
Public Property date_on_sale_from As Object
Public Property date_on_sale_from_gmt As Object
Public Property date_on_sale_to As Object
Public Property date_on_sale_to_gmt As Object
Public Property price_html As String
Public Property on_sale As Boolean
Public Property purchasable As Boolean
Public Property total_sales As Integer
Public Property virtual As Boolean
Public Property downloadable As Boolean
Public Property downloads() As Object
Public Property download_limit As Integer
Public Property download_expiry As Integer
Public Property external_url As String
Public Property button_text As String
Public Property tax_status As String
Public Property tax_class As String
Public Property manage_stock As Boolean
Public Property stock_quantity As Integer
Public Property in_stock As Boolean
Public Property backorders As String
Public Property backorders_allowed As Boolean
Public Property backordered As Boolean
Public Property sold_individually As Boolean
Public Property weight As String
Public Property dimensions As Dimensions
Public Property shipping_required As Boolean
Public Property shipping_taxable As Boolean
Public Property shipping_class As String
Public Property shipping_class_id As Integer
Public Property reviews_allowed As Boolean
Public Property average_rating As String
Public Property rating_count As Integer
Public Property related_ids() As Integer
Public Property upsell_ids() As Object
Public Property cross_sell_ids() As Object
Public Property parent_id As Integer
Public Property purchase_note As String
Public Property categories() As Category
Public Property tags() As Tag
Public Property images() As Image
Public Property attributes() As Object
Public Property default_attributes() As Object
Public Property variations() As Object
Public Property grouped_products() As Object
Public Property menu_order As Integer
Public Property meta_data() As Meta_Data
Public Property _links As _Links
End Class
Public Class Dimensions
Public Property length As String
Public Property width As String
Public Property height As String
End Class
Public Class _Links
Public Property self() As Self
Public Property collection() As Collection
End Class
Public Class Self
Public Property href As String
End Class
Public Class Collection
Public Property href As String
End Class
Public Class Category
Public Property id As Integer
Public Property name As String
Public Property slug As String
End Class
Public Class Tag
Public Property id As Integer
Public Property name As String
Public Property slug As String
End Class
Public Class Image
Public Property id As Integer
Public Property date_created As Date
Public Property date_created_gmt As Date
Public Property date_modified As Date
Public Property date_modified_gmt As Date
Public Property src As String
Public Property name As String
Public Property alt As String
Public Property position As Integer
End Class
Public Class Meta_Data
Public Property id As Integer
Public Property key As String
Public Property value As Object
End Class
End Namespace
please use CODE in editor to post any code...
jSon data
jSon data
[
{
"id": 6041,
"name": "Windham Educators Protractors Rulers Squares Fabrics USB by the Yard 39022-2",
"slug": "windham-educators-protractors-rulers-squares-fabrics-usb-by-the-yard-39022-2",
"permalink": "https://fabricutopia.com/product/windham-educators-protractors-rulers-squares-fabrics-usb-by-the-yard-39022-2/",
"date_created": "2016-12-22T03:44:06",
"date_created_gmt": "2016-12-22T03:44:06",
"date_modified": "2016-12-22T18:33:54",
"date_modified_gmt": "2016-12-22T18:33:54",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Contents 100% cotton<br />\nWidth 44''<br />\nPlease NOTE: Sold per ONE YARD LENGTHS</p>\n<p>This listing is for 1 yard ( 36 inches) of fabric. If you would like to purchase more or less than one yard lengths we will set up a custom listing just for you</p>\n<p>Fabric Manufacturer (if known): Windham Fabrics<br />\nFabric Collection (If known):<br />\nPrint (if Known):<br />\nStock Number (If known) : </p>\n<p>Description: Sail Away by Rosemarie Lavin Design is a nautical themed fabric collection that consists of patterns of sailboats, anchors, ropes, compasses and flags</p>\n",
"short_description": "",
"sku": "452016856",
"price": "7.97",
"regular_price": "7.97",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>7.97</span>",
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": true,
"stock_quantity": 8,
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "6",
"dimensions": {
"length": "7",
"width": "5",
"height": "0.1"
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "fabric",
"shipping_class_id": 173,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
96,
44,
104,
114,
153
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 8,
"name": "Fabric",
"slug": "fabric"
},
{
"id": 514,
"name": "Theme Prints",
"slug": "theme-prints"
}
],
"tags": [
{
"id": 123,
"name": "anchor fabric",
"slug": "anchor-fabric"
},
{
"id": 17,
"name": "cotten fabric",
"slug": "cotten-fabric"
},
{
"id": 19,
"name": "fabric by the yard",
"slug": "fabric-by-the-yard"
},
{
"id": 18,
"name": "fabric supplies",
"slug": "fabric-supplies"
},
{
"id": 28,
"name": "home decor fabric",
"slug": "home-decor-fabric"
},
{
"id": 124,
"name": "nautical fabric",
"slug": "nautical-fabric"
},
{
"id": 122,
"name": "nautical theme",
"slug": "nautical-theme"
},
{
"id": 27,
"name": "quilting fabric",
"slug": "quilting-fabric"
},
{
"id": 20,
"name": "sewing fabric",
"slug": "sewing-fabric"
},
{
"id": 125,
"name": "windham fabrics",
"slug": "windham-fabrics"
}
],
"images": [
{
"id": 6042,
"date_created": "2016-12-22T03:44:07",
"date_created_gmt": "2016-12-22T03:44:07",
"date_modified": "2016-12-22T03:44:07",
"date_modified_gmt": "2016-12-22T03:44:07",
"src": "https://fabricutopia.com/wp-content/uploads/2016/12/il_fullxfull.1053841349_q7vf.jpg",
"name": "il_fullxfull.1053841349_q7vf.jpg",
"alt": "",
"position": 0
},
{
"id": 6043,
"date_created": "2016-12-22T03:44:07",
"date_created_gmt": "2016-12-22T03:44:07",
"date_modified": "2016-12-22T03:44:07",
"date_modified_gmt": "2016-12-22T03:44:07",
"src": "https://fabricutopia.com/wp-content/uploads/2016/12/il_fullxfull.1053841349_q7vf-1.jpg",
"name": "il_fullxfull.1053841349_q7vf.jpg",
"alt": "",
"position": 1
},
{
"id": 6044,
"date_created": "2016-12-22T03:44:08",
"date_created_gmt": "2016-12-22T03:44:08",
"date_modified": "2016-12-22T03:44:08",
"date_modified_gmt": "2016-12-22T03:44:08",
"src": "https://fabricutopia.com/wp-content/uploads/2016/12/il_fullxfull.1053849505_oo8o.jpg",
"name": "il_fullxfull.1053849505_oo8o.jpg",
"alt": "",
"position": 2
},
{
"id": 6045,
"date_created": "2016-12-22T03:44:09",
"date_created_gmt": "2016-12-22T03:44:09",
"date_modified": "2016-12-22T03:44:09",
"date_modified_gmt": "2016-12-22T03:44:09",
"src": "https://fabricutopia.com/wp-content/uploads/2016/12/il_fullxfull.1053849509_n0zn.jpg",
"name": "il_fullxfull.1053849509_n0zn.jpg",
"alt": "",
"position": 3
}
],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 55498,
"key": "_wpas_done_all",
"value": "1"
},
{
"id": 55520,
"key": "_min_variation_price",
"value": ""
},
{
"id": 55521,
"key": "_max_variation_price",
"value": ""
},
{
"id": 55522,
"key": "_min_variation_regular_price",
"value": ""
},
{
"id": 55523,
"key": "_max_variation_regular_price",
"value": ""
},
{
"id": 55524,
"key": "_min_variation_sale_price",
"value": ""
},
{
"id": 55525,
"key": "_max_variation_sale_price",
"value": ""
},
{
"id": 55527,
"key": "_file_path",
"value": ""
},
{
"id": 55530,
"key": "_product_url",
"value": ""
},
{
"id": 55531,
"key": "_button_text",
"value": ""
},
{
"id": 56397,
"key": "_jetpack_related_posts_cache",
"value": {
"32b0bf150bb6bd30c74ed5fafdacd61f": {
"expires": 1492034944,
"payload": [
{
"id": 186
},
{
"id": 191
},
{
"id": 197
}
]
}
}
},
{
"id": 56399,
"key": "_jetpack_dont_email_post_to_subs",
"value": "1"
},
{
"id": 56400,
"key": "_cpf_brand",
"value": ""
},
{
"id": 56401,
"key": "_cpf_mpn",
"value": ""
},
{
"id": 56402,
"key": "_cpf_upc",
"value": ""
},
{
"id": 56403,
"key": "_cpf_ean",
"value": ""
},
{
"id": 56404,
"key": "_cpf_valid",
"value": "true"
},
{
"id": 56405,
"key": "_is_api",
"value": "no"
},
{
"id": 56406,
"key": "_api_data_is_global",
"value": "no"
},
{
"id": 56407,
"key": "_api_is_subscription",
"value": "no"
},
{
"id": 56408,
"key": "_api_activations_parent",
"value": ""
},
{
"id": 56409,
"key": "parent_product_id",
"value": "6041"
},
{
"id": 56410,
"key": "_api_software_title_parent",
"value": ""
},
{
"id": 56411,
"key": "_api_new_version",
"value": ""
},
{
"id": 56412,
"key": "_api_plugin_url",
"value": ""
},
{
"id": 56413,
"key": "_api_author",
"value": ""
},
{
"id": 56414,
"key": "_api_version_required",
"value": ""
},
{
"id": 56415,
"key": "_api_tested_up_to",
"value": ""
},
{
"id": 56416,
"key": "_api_last_updated",
"value": ""
},
{
"id": 56417,
"key": "_api_description",
"value": "0"
},
{
"id": 56418,
"key": "_api_changelog",
"value": "0"
},
{
"id": 56419,
"key": "_api_installation",
"value": "0"
},
{
"id": 56420,
"key": "_api_faq",
"value": "0"
},
{
"id": 56421,
"key": "_api_screenshots",
"value": "0"
},
{
"id": 56422,
"key": "_api_other_notes",
"value": "0"
},
{
"id": 56423,
"key": "_api_product_documentation",
"value": "0"
},
{
"id": 56424,
"key": "wc_productdata_options",
"value": [
{
"_bubble_new": "",
"_bubble_text": "",
"_custom_tab_title": "",
"_custom_tab": "",
"_product_video": "",
"_product_video_size": "",
"_top_content": "",
"_bottom_content": ""
}
]
},
{
"id": 56430,
"key": "_area",
"value": ""
},
{
"id": 56431,
"key": "_volume",
"value": ""
},
{
"id": 56432,
"key": "_wc_measurement_price_calculator_min_price",
"value": ""
},
{
"id": 56433,
"key": "_wc_price_calculator",
"value": {
"calculator_type": "dimension",
"dimension": {
"pricing": {
"enabled": "yes",
"label": "yard",
"unit": "yd",
"calculator": {
"enabled": "yes"
},
"inventory": {
"enabled": "yes"
},
"weight": {
"enabled": "yes"
}
},
"length": {
"enabled": "yes",
"label": "Required Length",
"unit": "yd",
"editable": "no",
"options": [
"1/4",
" 1/2",
" 1",
" 1.5",
" 2",
" 2.5",
" 3",
" 3.5",
" 4",
" 4.5",
" 5",
" 6",
" 7",
" 8",
" 9",
" 10"
]
},
"width": {
"enabled": "no",
"label": "Required Width",
"unit": "in",
"editable": "no",
"options": [
""
]
},
"height": {
"enabled": "no",
"label": "Required Height",
"unit": "in",
"editable": "no",
"options": [
""
]
}
},
"area": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "sq. ft.",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"area": {
"label": "Required Area",
"unit": "sq. ft.",
"editable": "yes",
"options": [
""
]
}
},
"area-dimension": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "sq. ft.",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"length": {
"label": "Length",
"unit": "in",
"editable": "yes",
"options": [
""
]
},
"width": {
"label": "Width",
"unit": "in",
"editable": "yes",
"options": [
""
]
}
},
"area-linear": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "in",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"length": {
"label": "Length",
"unit": "in",
"editable": "yes",
"options": [
""
]
},
"width": {
"label": "Width",
"unit": "in",
"editable": "yes",
"options": [
""
]
}
},
"area-surface": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "sq. ft.",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"length": {
"label": "Length",
"unit": "in",
"editable": "yes",
"options": [
""
]
},
"width": {
"label": "Width",
"unit": "in",
"editable": "yes",
"options": [
""
]
},
"height": {
"label": "Height",
"unit": "in",
"editable": "yes",
"options": [
""
]
}
},
"volume": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "ml",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"volume": {
"label": "Required Volume",
"unit": "ml",
"editable": "yes",
"options": [
""
]
}
},
"volume-dimension": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "ml",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"length": {
"label": "Length",
"unit": "in",
"editable": "yes",
"options": [
""
]
},
"width": {
"label": "Width",
"unit": "in",
"editable": "yes",
"options": [
""
]
},
"height": {
"label": "Height",
"unit": "in",
"editable": "yes",
"options": [
""
]
}
},
"volume-area": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "ml",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"area": {
"label": "Area",
"unit": "sq. ft.",
"editable": "yes",
"options": [
""
]
},
"height": {
"label": "Height",
"unit": "in",
"editable": "yes",
"options": [
""
]
}
},
"weight": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "oz",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"weight": {
"label": "Required Weight",
"unit": "oz",
"editable": "yes",
"options": [
""
]
}
},
"wall-dimension": {
"pricing": {
"enabled": "no",
"label": "",
"unit": "sq. ft.",
"calculator": {
"enabled": "no"
},
"inventory": {
"enabled": "no"
},
"weight": {
"enabled": "no"
}
},
"length": {
"label": "Distance around your room",
"unit": "in",
"editable": "yes",
"options": [
""
]
},
"width": {
"label": "Height",
"unit": "in",
"editable": "yes",
"options": [
""
]
}
}
}
},
{
"id": 56434,
"key": "_wc_price_calculator_pricing_rules",
"value": []
},
{
"id": 56439,
"key": "wpcf-google_product_id",
"value": "47"
},
{
"id": 56440,
"key": "wpcf-brand",
"value": "Windham Fabrics"
}
],
"_links": {
"self": [
{
"href": "https://fabricutopia.com/wp-json/wc/v2/products/6041"
}
],
"collection": [
{
"href": "https://fabricutopia.com/wp-json/wc/v2/products"
}
]
}
},
{
"id": 6037,
"name": "Windham Educators Keyboards with Phrases Fabrics by the Yard",
"slug": "windham-educators-keyboards-with-phrases-fabrics-by-the-yard",
"permalink": "https://fabricutopia.com/product/windham-educators-keyboards-with-phrases-fabrics-by-the-yard/",
"date_created": "2016-12-22T03:44:03",
"date_created_gmt": "2016-12-22T03:44:03",
"date_modified": "2016-12-22T03:44:03",
"date_modified_gmt": "2016-12-22T03:44:03",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Contents 100% cotton<br />\nWidth 44''<br />\nPlease NOTE: Sold per ONE YARD LENGTHS</p>\n<p>This listing is for 1 yard ( 36 inches) of fabric. If you would like to purchase more or less than one yard lengths we will set up a custom listing just for you</p>\n<p>Fabric Manufacturer (if known): Windham Fabrics<br />\nFabric Collection (If known):<br />\nPrint (if Known):<br />\nStock Number (If known) : </p>\n<p>Description: Sail Away by Rosemarie Lavin Design is a nautical themed fabric collection that consists of patterns of sailboats, anchors, ropes, compasses and flags</p>\n",
"short_description": "",
"sku": "465502119",
"price": "7.97",
"regular_price": "7.97",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>7.97</span>",
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": true,
"stock_quantity": 8,
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "6",
"dimensions": {
"length": "7",
"width": "5",
"height": "0.1"
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "fabric",
"shipping_class_id": 173,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
137,
142,
104,
145,
59
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 8,
"name": "Fabric",
"slug": "fabric"
},
{
"id": 514,
"name": "Theme Prints",
"slug": "theme-prints"
}
],
"tags": [
{
"id": 1563,
"name": "computer accessories",
"slug": "computer-accessories"
},
{
"id": 17,
"name": "cotten fabric",
"slug": "cotten-fabric"
},
{
"id": 1561,
"name": "educators",
"slug": "educators"
},
{
"id": 19,
"name": "fabric by the yard",
"slug": "fabric-by-the-yard"
},
{
"id": 18,
"name": "fabric supplies",
"slug": "fabric-supplies"
},
{
"id": 28,
"name": "home decor fabric",
"slug": "home-decor-fabric"
},
{
"id": 1562,
"name": "keyboards",
"slug": "keyboards"
},
{
"id": 27,
"name": "quilting fabric",
"slug": "quilting-fabric"
},
{
"id": 20,
"name": "sewing fabric",
"slug": "sewing-fabric"
},
{
"id": 125,
"name": "windham fabrics",
"slug": "windham-fabrics"
}
],
"images": [
{
"id": 6038,
"date_created": "2016-12-22T03:44:04",
"date_created_gmt": "2016-12-22T03:44:04",
"date_modified": "2016-12-22T03:44:04",
"date_modified_gmt": "2016-12-22T03:44:04",
"src": "https://fabricutopia.com/wp-content/uploads/2016/12/il_fullxfull.1053842835_7lgn.jpg",
"name": "il_fullxfull.1053842835_7lgn.jpg",
"alt": "",
"position": 0
},
{
"id": 6039,
"date_created": "2016-12-22T03:44:04",
"date_created_gmt": "2016-12-22T03:44:04",
"date_modified": "2016-12-22T03:44:04",
"date_modified_gmt": "2016-12-22T03:44:04",
"src": "https://fabricutopia.com/wp-content/uploads/2016/12/il_fullxfull.1053842835_7lgn-1.jpg",
"name": "il_fullxfull.1053842835_7lgn.jpg",
"alt": "",
"position": 1
},
{
"id": 6040,
"date_created": "2016-12-22T03:44:05",
"date_created_gmt": "2016-12-22T03:44:05",
"date_modified": "2016-12-22T03:44:05",
"date_modified_gmt": "2016-12-22T03:44:05",
"src": "https://fabricutopia.com/wp-content/uploads/2016/12/il_fullxfull.1053850957_8mhx.jpg",
"name": "il_fullxfull.1053850957_8mhx.jpg",
"alt": "",
"position": 2
}
],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 55452,
"key": "_wpas_done_all",
"value": "1"
},
{
"id": 55474,
"key": "_min_variation_price",
"value": ""
},
{
"id": 55475,
"key": "_max_variation_price",
"value": ""
},
{
"id": 55476,
"key": "_min_variation_regular_price",
"value": ""
},
{
"id": 55477,
"key": "_max_variation_regular_price",
"value": ""
},
{
"id": 55478,
"key": "_min_variation_sale_price",
"value": ""
},
{
"id": 55479,
"key": "_max_variation_sale_price",
"value": ""
},
{
"id": 55481,
"key": "_file_path",
"value": ""
},
{
"id": 55484,
"key": "_product_url",
"value": ""
},
{
"id": 55485,
"key": "_button_text",
"value": ""
},
{
"id": 55486,
"key": "wpcf-brand",
"value": " Windham Fabrics"
},
{
"id": 55487,
"key": "wpcf-mpn",
"value": ""
},
{
"id": 55488,
"key": "wpcf-google_product_id",
"value": "47"
},
{
"id": 56947,
"key": "_jetpack_related_posts_cache",
"value": {
"32b0bf150bb6bd30c74ed5fafdacd61f": {
"expires": 1483637712,
"payload": []
}
}
}
],
"_links": {
"self": [
{
"href": "https://fabricutopia.com/wp-json/wc/v2/products/6037"
}
],
"collection": [
{
"href": "https://fabricutopia.com/wp-json/wc/v2/products"
}
]
}
}
]
try
Dim WooResponse = JsonConvert.DeserializeJSon(Of WooCommerceData.Results)(result)
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
ASKER
The json that is coming over is the following:
[{"id":6041,"name":"Windha