Hi,
I read several posts about converting a json- to a csv file. I also had a look at the JsonTree. But all those example processes the complete json file as one single string.
But what if the string is too large to fit into memory?
I would appreciate if I could get some hints how to convert the following VB.Net code to B4J.
Thanks!
I read several posts about converting a json- to a csv file. I also had a look at the JsonTree. But all those example processes the complete json file as one single string.
But what if the string is too large to fit into memory?
I would appreciate if I could get some hints how to convert the following VB.Net code to B4J.
B4X:
Using Sr As New StreamReader(JsonFileName)
Using reader As New JsonTextReader(Sr)
reader.SupportMultipleContent = True
Dim serializer = New JsonSerializer()
While reader.Read()
If reader.TokenType = JsonToken.StartObject Then
Dim cc As JsonApiClient.SAPODataSalesCollection = serializer.Deserialize(Of JsonApiClient.SAPODataSalesCollection)(reader)
For Each c In cc.D.Results
myimportstreamwriter.WriteLine(MyLine)
Next
End If
End While
End Using
End Using
myimportstreamwriter.Close()
myimportstreamwriter.Dispose()
Thanks!