【问题标题】:how to parse json in basic4android?如何在basic4android中解析json?
【发布时间】:2017-08-13 12:08:58
【问题描述】:

我想将 JSON 从 URL 解析为 basic4android 中的 android 标签。

我尝试了这个但没有用:

Sub Activity_Create(FirstTime As Boolean)
Dim Label1 As Label
Dim job As HttpJob

job.Initialize("Job", Me)
job.Download("http://api.tvmaze.com/shows/82")


If job.Success = True Then

Dim parser As JSONParser
parser.Initialize(job.GetString)
Dim root As Map = parser.NextObject

Dim name As String = root.Get("name")
Label1.Text = Title
End if

【问题讨论】:

  • 您应该说出问题所在,而不是“不工作”。第一个猜测是你应该使用name 而不是Title

标签: android json basic4android


【解决方案1】:

你有Label1.Text = Title,它应该是Label1.Text = name

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-06-28
    • 2021-09-06
    • 2018-07-23
    • 2018-07-13
    • 2017-06-15
    • 2017-04-26
    • 2018-12-09
    • 2010-12-05
    相关资源
    最近更新 更多