locked
[UWP] Deserializing Application Insights JSON RRS feed

  • General discussion

  • I'm trying to use json.net to deserialize json from AIA into my class. Not sure if I'm approaching it right but I use linq to json to get at the data section of the json and then try to deserialize to my class using ..

    Dim rawjson As String = GetTelemetry() Dim o As JObject = JObject.Parse(rawjson) Dim ds = DirectCast(o("Tables")(0)("Rows"), JArray) Dim Sessions As List(Of Session) = JsonConvert.DeserializeObject(Of List(Of Session))(ds)

    This fails as the json from AI is in this format..

    "Rows": [ [ "Boy", "9", "", "", "0", "0", "22", "0" ], [ "Boy", "9", "", "", "0", "0", "41", "0" ],

    The data for the individual rows is a JArray rather than an object ?

    Can some one please explain how to do this ?

    Thursday, June 29, 2017 7:11 PM