|
-
Thread Starter
PowerPoster
Re: READ json file
 Originally Posted by woeoio
Code:
Private Sub Form_Load()
With New cJson
.LoadFrom App.Path & "\json1.txt"
Dim x As Variant
With .Root("results")(1) ' return dict obj
For Each x In .Item("address_components")
List1.AddItem x("long_name")
Next
Me.Caption = .Item("formatted_address")
List2.AddItem .Item("navigation_points")(1)("location")("latitude")
List2.AddItem .Item("geometry")("viewport")("northeast")("lat")
List2.AddItem .Item("place_id")
List2.AddItem .Item("types")(2)
End With
Label1.Caption = .Root("status")
End With
End Sub
cJson Developer Documentation | VB6 PRO DOCS
https://doc.vb6.pro/en/vbman/Json/
Download vbman and look at [ \demos\Json\vbman-json-demo5 ]
.and haver error in With New cJson: cant find project lbrary
NOT understand your tips....
can you post a complete code here?
tks
Last edited by luca90; Today at 07:56 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|