B4J Question JRDC2 return Json

josejad

Expert
Licensed User
Longtime User
B4X:
Type DBResult (Tag As Object, Columns As Map, Rows As List)

You get a DBResult, You can create a map with the column name and the values, and then create a json with jsonGenerator
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
B4X:
Sub ReturnJSON(map As Map, resp As ServletResponse)
    resp.ContentType = "application/json"
    resp.Write(Map2Json(map))
End Sub
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Here is another sample:
 
Upvote 0
Top