Android Question Json Output Problem

victormedranop

Well-Known Member
Licensed User
Longtime User
Hi, I'm generating a Jason code from a list. but my problem is the output.
I know is valid but I need the missing double quoted
but I don't know how to add de (")

B4X:
Data1.Add("RetailId"&":"&aditional.reatilid)

this output generate
this
"TerminalId:0001",

but what I need is
"TerminalId":"0001",

Thanks,


Victor
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
B4X:
Dim values As Map
values.Initialize

values.Put("TerminalId", "00001")
           
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(values)

Log(JSONGenerator.ToPrettyString(2))
 
Upvote 0
Top