/// <summary> /// Content from s3 in format of /// ["val1", "val2", null, ...], /// ["val3", "val4", null, ...], /// ... /// To parse it as a json, we need to preappend '[' and append ']' to the stream /// </summary> /// <param name="content"></param> /// <param name="resultChunk"></param> private void ParseStreamIntoChunk(Stream content, IResultChunk resultChunk) { Stream openBracket = new MemoryStream(Encoding.UTF8.GetBytes("[")); Stream closeBracket = new MemoryStream(Encoding.UTF8.GetBytes("]")); Stream concatStream = new ConcatenatedStream(new Stream[3] { openBracket, content, closeBracket }); IChunkParser parser = new ReusableChunkParser(concatStream); parser.ParseChunk(resultChunk); }
/// <summary> /// Content from s3 in format of /// ["val1", "val2", null, ...], /// ["val3", "val4", null, ...], /// ... /// To parse it as a json, we need to preappend '[' and append ']' to the stream /// </summary> /// <param name="content"></param> /// <param name="resultChunk"></param> private void ParseStreamIntoChunk(Stream content, IResultChunk resultChunk) { IChunkParser parser = new ReusableChunkParser(content); parser.ParseChunk(resultChunk); }