|
|
@@ -31,7 +31,7 @@ extension Message {
|
|
|
options: JSONEncodingOptions = JSONEncodingOptions()
|
|
|
) throws -> String where C.Iterator.Element == Self {
|
|
|
let data: [UInt8] = try jsonUTF8Bytes(from: collection, options: options)
|
|
|
- return String(bytes: data, encoding: .utf8)!
|
|
|
+ return String(decoding: data, as: UTF8.self)
|
|
|
}
|
|
|
|
|
|
/// Returns a `SwiftProtobufContiguousBytes` containing the UTF-8 JSON serialization of the messages.
|