I need to inspect in debug my json string returning from the server.
The debug "copy to clipboard" truncates the data.
The JSON parser seems to throwing away some rows in the JSON string
The debug "copy to clipboard" truncates the data.
The JSON parser seems to throwing away some rows in the JSON string
B4X:
Sub HandleContracts(Job As HttpJob)
If Job.Success = False Then
ToastMessageShow("Error downloading data.", True)
ProgressDialogHide
Return
End If
Dim TextReader1 As TextReader
TextReader1.Initialize(Job.GetInputStream)
Dim Text As String
Text = StripTags(TextReader1.ReadAll )
Dim p AsJSONParser
RowMap.Initialize
TableList.Initialize
p.Initialize(Text)
end sub
Sub StripTags(sJSON As String) As String
Dim Text As String=""
Text = sJSON
Do While Text.IndexOf(">")>0
Dim StartTag As Int
Dim EndTag As Int
StartTag=Text.IndexOf("<")
EndTag=Text.IndexOf(">")+1
Dim S As StringBuilder
S.Initialize
S.Append(Text)
S=S.Remove(StartTag,EndTag)
Text=S.ToString
Loop
Return(Text)
End Sub