#RoastMe

Please roast this Pipe to multiple labeled colon-prefixed Json-documents parser snippet.

https://gist.github.com/AliveDevil/154dd2869cce8303cb94e10f5e2bf070

#DotNet #CSharp

HandBrakeCLI.ParserMode.cs

GitHub Gist: instantly share code, notes, and snippets.

Gist
@AliveDevil A cursory glance, but how does your reader handle multibyte characters? For instance emojis.

@Gjoel
HandBrakeCLI has a specific output format, so I ignored that.

But to answer the question: As long as the prefix is ending in a colon character, it mostly doesn't care.
I.e. everything until ':' is buffered, and then at-once converted using Encoding.UTF8.

@Gjoel In case of ambiguous byte-sequences and encoding differences between the Pipe-source and this code … that would collide, and generate garbage.