B4J Question Variables question.....

LWGShane

Well-Known Member
Licensed User
Longtime User
I just figured out how to get my DigitalOcean library to work, but I'm confused on how to actually use the variables that I get from the map.

B4X:
Dim parser As JSONParser
parser.Initialize(<text>)
Dim root As Map = parser.NextObject
Dim account As Map = root.Get("account")
Dim status_message As String = account.Get("status_message")
Dim email_verified As String = account.Get("email_verified")
Dim droplet_limit As Int = account.Get("droplet_limit")
Dim floating_ip_limit As Int = account.Get("floating_ip_limit")
Dim uuid As String = account.Get("uuid")
Dim email As String = account.Get("email")
Dim status As String = account.Get("status")

For example, how would I use the "email" variable outside the class/library?
 

DonManfred

Expert
Licensed User
Longtime User
create a property "email" and create getter and setter for it. while jsonparsing you use the setter to set email to the right value.
Outside class you use the getter to get the defined email
 
Upvote 0
Top