Android Question How to submit data with Json

Daniel-White

Active Member
Licensed User
Longtime 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

B4X founder
Staff member
Licensed User
Longtime 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: https://www.b4x.com/android/forum/threads/18992/#content
 
Upvote 0

Daniel-White

Active Member
Licensed User
Longtime 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: https://www.b4x.com/android/forum/threads/18992/#content

WordExpress
 
Upvote 0
Top