init(jsonUTF8Data:extensions:options:)

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

Message+JSONAdditions_Data.swift:41
init(jsonUTF8Data: Data, extensions: (any ExtensionMap)? = nil, options: JSONDecodingOptions = JSONDecodingOptions()) throws

Parameters

jsonUTF8Data

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.