Xbasic
Extension::JsonArrayChunked Method
Syntax
.ArrayChunked as c (json as C, maximumRows as N,maximumBytes as N,separator as C)
Arguments
- jsonCharacter
Json Array.
- maximumRowsNumeric
If greater than zero, the maximum number of rows in a 'chunk'.
- maximumBytesNumeric
If greater than zero, the maximum number of bytes in a 'chunk' / a chunk may be bigger than maximumBytes if a single entry is bigger that maximumBytes.
- separatorCharacter
Separator between 'chunks'.
Returns
- resultCharacter
Json Array.
Description
Returns multiple json strings separated by a supplied 'separator' string. maximumRows if > 0 is the maximum number or rows before we chunk it, maximumBytes if > 0 is the maximum number of bytes of data before we chunk it.
Example
? extension::json::ArrayChunked("[10,20,30,40,50,60,70,80,90]",3,0,crlf()+"--sep--"+crlf()) = [ 10,20,30 ] --sep-- [ 40,50,60 ] --sep-- [ 70,80,90 ]