- Messages
- 155
- Reaction score
- 1
- Points
- 28
Mga master pa help naman po masolve ung problem ko
Ex. Json File
{
"ID": 21,
"container": "a",
"created_entity_ids": null,
"child_entity_ids": null,
"content_tier1": {
"owner": {
"lastName": "Dwane",
"firstName": "Chris"
},
"employer": {
"name": "The Pool Company"
},
"payStubPeriodTo": "2018-12-01"
},
"borrower_name": "Dwane, Chris",
"sales_branch": {
"name": "Houston"
},
"processing_branch": {
"name": "Houston"
}
}
My code
Imports System.IO
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim json As String
Dim a As String
Dim b As String
Dim c As String
Dim d As String
Dim g As String
Dim f As String
Dim h As String
Dim i As String
Dim j As String
Dim l As String
json = My.Computer.FileSystem.ReadAllText("C:\JsonTest.Txt")
Dim read = Newtonsoft.Json.Linq.JObject.Parse(json)
TextBox1.Text = read.Item("loan_id").ToString
TextBox2.Text = read.Item("content_tier1").ToString
a = TextBox2.Lines(2).Remove(14)
b = TextBox2.Lines(2).Substring(15)
c = TextBox2.Lines(3).Remove(15)
d = TextBox2.Lines(3).Substring(16)
g = TextBox2.Lines(5).Remove(12)
f = TextBox2.Lines(5).Substring(15)
h = TextBox2.Lines(6).Remove(10)
i = TextBox2.Lines(6).Substring(13)
j = TextBox2.Lines(8).Remove(25)
l = TextBox2.Lines(8).Substring(21)
TextBox3.Text = a
TextBox4.Text = b
TextBox5.Text = c
TextBox6.Text = d
TextBox7.Text = g
TextBox8.Text = f
TextBox9.Text = h
TextBox10.Text = i
TextBox11.Text = j
TextBox12.Text = l
End Sub
End Class
Output dapat nyan is
21 blank
owner blank
lastName "Value"
firstName "value"
employer blank
name "Value"
paystubperiod "value"
ang trigger ko po is si content_tier1 kaso ang nagging output po nya is
21 {
mali na po agad sa simula any advice naman po mga master sensya medyo magulo ata explination ko
Ex. Json File
{
"ID": 21,
"container": "a",
"created_entity_ids": null,
"child_entity_ids": null,
"content_tier1": {
"owner": {
"lastName": "Dwane",
"firstName": "Chris"
},
"employer": {
"name": "The Pool Company"
},
"payStubPeriodTo": "2018-12-01"
},
"borrower_name": "Dwane, Chris",
"sales_branch": {
"name": "Houston"
},
"processing_branch": {
"name": "Houston"
}
}
My code
Imports System.IO
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim json As String
Dim a As String
Dim b As String
Dim c As String
Dim d As String
Dim g As String
Dim f As String
Dim h As String
Dim i As String
Dim j As String
Dim l As String
json = My.Computer.FileSystem.ReadAllText("C:\JsonTest.Txt")
Dim read = Newtonsoft.Json.Linq.JObject.Parse(json)
TextBox1.Text = read.Item("loan_id").ToString
TextBox2.Text = read.Item("content_tier1").ToString
a = TextBox2.Lines(2).Remove(14)
b = TextBox2.Lines(2).Substring(15)
c = TextBox2.Lines(3).Remove(15)
d = TextBox2.Lines(3).Substring(16)
g = TextBox2.Lines(5).Remove(12)
f = TextBox2.Lines(5).Substring(15)
h = TextBox2.Lines(6).Remove(10)
i = TextBox2.Lines(6).Substring(13)
j = TextBox2.Lines(8).Remove(25)
l = TextBox2.Lines(8).Substring(21)
TextBox3.Text = a
TextBox4.Text = b
TextBox5.Text = c
TextBox6.Text = d
TextBox7.Text = g
TextBox8.Text = f
TextBox9.Text = h
TextBox10.Text = i
TextBox11.Text = j
TextBox12.Text = l
End Sub
End Class
Output dapat nyan is
21 blank
owner blank
lastName "Value"
firstName "value"
employer blank
name "Value"
paystubperiod "value"
ang trigger ko po is si content_tier1 kaso ang nagging output po nya is
21 {
mali na po agad sa simula any advice naman po mga master sensya medyo magulo ata explination ko