Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Web.Script.Serialization
- Imports Newtonsoft.Json
- Public Class Form1
- Private Sub go_button_Click(sender As Object, e As EventArgs) Handles go_button.Click
- Dim json As String = input_box.Text
- Dim posts = JsonConvert.DeserializeObject(Of Post())(json) ' Deserialize array of Post objects
- If posts.Length = 1 Then ' or whatever condition you prefer
- post_text_box.Text = posts(1).com
- End If
- End Sub
- End Class
- Public Class Rootobject
- Public Property posts() As Post
- End Class
- Public Class Post
- Public Property no As Integer
- Public Property now As String
- Public Property name As String
- Public Property com As String
- Public Property filename As String
- Public Property ext As String
- Public Property w As Integer
- Public Property h As Integer
- Public Property tn_w As Integer
- Public Property tn_h As Integer
- Public Property tim As Long
- Public Property time As Integer
- Public Property md5 As String
- Public Property fsize As Integer
- Public Property resto As Integer
- Public Property bumplimit As Integer
- Public Property imagelimit As Integer
- Public Property replies As Integer
- Public Property images As Integer
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement