class ComplexJsonStreamGiven what is in the buffer, parse a single object out of it. If a complete object isn't available, return null. Assumes that we are at the start of an object to parse.
Register that we have another chunk available for consumption. If we are waiting for a chunk, resolve the promise waiting for it immediately. If not, then add it to the queue.
Skip characters in the buffer till we get to the start of an object. Then attempt to read a full object. If we do read a full object, turn it into a chunk and send it to the chunk handler. Repeat this for as much as we can.
If the string is present, move the start of the buffer to the first occurrence of that string. This is useful for skipping over elements or parts that we're not really interested in parsing. (ie - the opening characters, comma separators, etc.)
Add data to the buffer. This may cause chunks to be generated, if available.
Indicate there is no more data that will be added to the text buffer. This should be called when all the data has been read and added to indicate that we should process everything remaining in the buffer.
Get the next chunk that is coming from the stream. This chunk may be null, usually indicating the last chunk in the stream.
Given what is in the buffer, parse a single object out of it.
Register that we have another chunk available for consumption.
Skip characters in the buffer till we get to the start of an object.
If the string is present, move the start of the buffer to the first occurrence
Add data to the buffer. This may cause chunks to be generated, if available.
Indicate there is no more data that will be added to the text buffer.
Get the next chunk that is coming from the stream.