diff --git a/src/ser.rs b/src/ser.rs index 80c2deb0c..b38f3486b 100644 --- a/src/ser.rs +++ b/src/ser.rs @@ -2064,6 +2064,8 @@ static ESCAPE: [u8; 256] = [ /// Serialize the given data structure as JSON into the IO stream. /// +/// Serialization guarantees it only feeds valid UTF-8 sequences to the writer. +/// /// # Errors /// /// Serialization can fail if `T`'s implementation of `Serialize` decides to @@ -2082,6 +2084,8 @@ where /// Serialize the given data structure as pretty-printed JSON into the IO /// stream. /// +/// Serialization guarantees it only feeds valid UTF-8 sequences to the writer. +/// /// # Errors /// /// Serialization can fail if `T`'s implementation of `Serialize` decides to