No zero based string index in TJsonStreamWriter.Write method for Value string.
Can you please clarify what you mean? What is the error message you get and what is the code that causes it?
TJSONWriter returns empty Stream in a Android App (not tested on IOS but it should do the same)
That's how it is, blame Delphi compiler for that.
For the second question Value[1] was #0 and Value[0]='{' (at BeginWriteObject) so copy from Value[1] to StrBuffLen puts a #0 at the first char in StrBuff. sparkle.inc define {$ZEROBASEDSTRINGS OFF} but on Debug's seems this doesn't work.
About the second question ARC on then WindowsButtonClick or AndroidButtonClik I make ARC=0 before acceding the stream, so I suppose that android would destroy asynchronously and that’s why flush it's not called.
So the suggestion about this to leave one version it's leave flush to be effluent (return a instance to himself, so I can connect flush to free so I don't need to create a variable to reference to.
Best regards
Alexander Brazda
Ok we can make Flush fluent. About the string issue, so after you correctly call Flush, are you sure the code you pasted fails if your change is not implemented?
I make Flush fluent and test the same code for Windows and android version works fine, so I can use reader without any variable reference.