Showing posts with label VB.Net. Show all posts
Showing posts with label VB.Net. Show all posts

Saturday 17 June 2023

Read (Consume) Rest API using VB.NET Windows Programming

 This post will help you to read a single record from API in JSON format using VB.Net Windows form Application.

Data formate 

{"roll":101,"name":"ram","city":"vns"}
Package Install
NuGet\Install-Package Newtonsoft.Json -Version 13.0.3
Code
Imports System.Net
Imports Newtonsoft.Json.Linq
  Dim json As String = New System.Net.WebClient().DownloadString("your api url")
  Dim parsejson As JObject = JObject.Parse(json)
  Label1.Text = "Roll=" & parsejson.SelectToken("roll").ToString  & ", Name=" &        parsejson.SelectToken("name").ToString  & ", City=" &   parsejson.SelectToken("city").ToString        

   Next Example

VB.Net API tutorial

 




Back to Home

Sunday 22 January 2023

Data Adapter



Data Adapter can be considered a collection of command objects which act like an interface between the database and the dataset.