-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
LibreOffice 26.2 brings JSON import and other long-awaited features
By Ivan Jenic,
- libreoffice
- libreoffice 26.2
- (and 3 more)
- 6 replies
- 0 views
-
- 0 replies
- 0 views
-
- 3 replies
- 9 views
-
Akka Serverless to offer secure and flexible solutions for building cloud-native services
By Fiza Ali,
- lightbend
- akka serverless
- (and 11 more)
- 0 replies
- 3 views
-
- 0 replies
- 167 views
-
Question
i11usive
I want to consume the following JSON data structure using a VB.NET handler. The handler is working on the root keys - how do I deal with Sub > Sub-1, Sub > Sub-2, Another-Sub > Sub-3
{ "ID": id, "ParentId": parentId, "Sub": [{ "Sub-1": [{ "Data":"Test", "MoreData":"MoreTestData" }], "Sub-2": [{ "Data":"Test 2", "MoreData":"More Test Data 2" }], }], "Another-Sub": [{ "Sub-3": [{ "Data":"Test 2", "MoreData":"More Test Data", "EvenMoreDate":"Even More Data" }], "Sub-4": [{ "Data":"Test 2", "MoreData":"More Test Data", "EvenMoreDate":"Even More Data" }], }], }My Handler code is as follows:
Dim js As New JavaScriptSerializer() Dim data As DataClass = js.Deserialize(Of DataClass)(json) Public Class DataClass Public Property ID() As String Get Return _ID End Get Set(value As String) _ID = value End Set End Property Private _ID As String etc etc End Class Public Class Sub Public Property Data() As String End ClassHow can I access tier 2 / 3 json data?
All help appreciated - hopefully I've described my issue satisfactorily.
Link to comment
https://www.neowin.net/forum/topic/1276388-nested-json-data/Share on other sites
6 answers to this question
Recommended Posts