init(jsonUTF8Bytes:extensions:options:)

Creates a new message by decoding the given SwiftProtobufContiguousBytes containing a serialized message in JSON format, interpreting the data as UTF-8 encoded text.

Message+JSONAdditions.swift:120
init<Bytes>(jsonUTF8Bytes: Bytes, extensions: (any ExtensionMap)? = nil, options: JSONDecodingOptions = JSONDecodingOptions()) throws where Bytes : SwiftProtobufContiguousBytes

Parameters

jsonUTF8Bytes

The JSON-formatted data to decode, represented as UTF-8 encoded text.

extensions

The extension map to use with this decode

options

The JSONDecodingOptions to use.

Throws

SwiftProtobufError or JSONDecodingError if decoding fails.