public static void Serialize <T>(Stream stream, T input) { Utf8.SerializeAsync <T>(input, stream).GetAwaiter().GetResult(); }