Instead of serializing JSON data to a string, and then publishing, I am wanting to serialize to publish stream.
Problem is I do not know the length before hand, and do not want to calculate each value and key in the JSON document.
Is it ok to pass beginPublish() a length larger than what I send, and call endPublish prematurely?
Or would I have to send dummy data after?
My idea is something like this, just wondering if there is a right and a wrong way to do this.
Instead of serializing JSON data to a string, and then publishing, I am wanting to serialize to publish stream. Problem is I do not know the length before hand, and do not want to calculate each value and key in the JSON document.
Is it ok to pass beginPublish() a length larger than what I send, and call endPublish prematurely? Or would I have to send dummy data after?
My idea is something like this, just wondering if there is a right and a wrong way to do this.