Daniel-White Active Member Licensed User Longtime User Jul 2, 2015 #1 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: Jul 2, 2015
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
Erel B4X founder Staff member Licensed User Longtime User Jul 2, 2015 #2 Is there any specific web service that you are trying to work with? Creating a json string is simple: Code: Copy 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
Is there any specific web service that you are trying to work with? Creating a json string is simple: Code: Copy 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
Daniel-White Active Member Licensed User Longtime User Jul 2, 2015 #3 Erel said: Is there any specific web service that you are trying to work with? Creating a json string is simple: Code: Copy 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 Click to expand... WordExpress Upvote 0
Erel said: Is there any specific web service that you are trying to work with? Creating a json string is simple: Code: Copy 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 Click to expand... WordExpress