Reading Json data

bluezap

New member
Joined
Oct 31, 2015
Messages
4
Programming Experience
5-10
I want to respond to this Json data in vb.net

VB.NET:
[COLOR=#000000]{[/COLOR][COLOR=#000000]
  [/COLOR][COLOR=#800000]"success"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]true[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
  [/COLOR][COLOR=#800000]"uses"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]3[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
  [/COLOR][COLOR=#800000]"purchase"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000000]{[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"id"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"OmyG5dPleDsByKGHsneuDQ=="[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"product_name"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"licenses demo product"[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"created_at"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"2014-04-05T00:21:56Z"[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"full_name"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"Maxwell Elliott"[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"variants"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]""[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"refunded"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]false[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#000000]#[/COLOR][COLOR=#000000] purchase was refunded[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000] non[/COLOR][COLOR=#000000]-[/COLOR][COLOR=#000000]subscription product only
    [/COLOR][COLOR=#800000]"chargebacked"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]false[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#000000]#[/COLOR][COLOR=#000000] purchase was refunded[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000] non[/COLOR][COLOR=#000000]-[/COLOR][COLOR=#000000]subscription product only
    [/COLOR][COLOR=#800000]"subscription_cancelled_at"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] null[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#000000]#[/COLOR][COLOR=#000000] subscription was cancelled[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    subscription product only
    [/COLOR][COLOR=#800000]"subscription_failed_at"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] null[/COLOR][COLOR=#000000],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#000000]#[/COLOR][COLOR=#000000] we were unable [/COLOR][COLOR=#00008B]to[/COLOR][COLOR=#000000] charge the subscriber[/COLOR][COLOR=#808080]'s card[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"custom_fields"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000000][],[/COLOR][COLOR=#000000]
    [/COLOR][COLOR=#800000]"email"[/COLOR][COLOR=#000000]:[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"maxwell@gumroad.com"[/COLOR][COLOR=#000000]
  [/COLOR][COLOR=#000000]}[/COLOR][COLOR=#000000]
[/COLOR][COLOR=#000000]}
[/COLOR]

For example if success is true then perform an action
or if uses > 2 perform another action
Any help would be much appreciated
 
Actual Json data (that is without those documentation comments) you can read with a Json library, for example Json.NET - Newtonsoft
Dim obj As Newtonsoft.Json.Linq.JObject = Newtonsoft.Json.JsonConvert.DeserializeObject(jsonstring)
Dim value = obj("success")
 

Similar threads

Latest posts

Back
Top