Android Question How to submit data with Json

Daniel-White

Active Member
Licensed User
Hi guys, I have been around in the forum learning about B4A from 6 months. now is the time to put one simple question for you.

Can some one share with me a very small example where json submit data to website, save info. I read back and forward all the forum all day :). and found partially info. I need something very simple to start to understand.


Thanks you so much.
Daniel W
 
Last edited:

Erel

Administrator
Staff member
Licensed User
Is there any specific web service that you are trying to work with?

Creating a json string is simple:
B4X:
Dim jg As JSONGenerator
jg.Initialize(CreateMap("field1": "value1", "field2": Array("a", "b", "c")))
Dim jsonString As String = jg.ToPrettyString(4)
Log(jsonString)
Sending the string with HttpUtils2 is also simple: http://www.b4x.com/android/forum/threads/18992/#content
 
Top