Skip to main content
←API Reference ←NSDK ←Nsdk_Vps_Anchor

array


Declaration​

static func array(fromJSONString jsonString: String, options: JSONDecodingOptions = JSONDecodingOptions()) throws -> [Self]

Summary​

Creates a new array of messages by decoding the given string containing a
serialized array of messages in JSON format.

Throws​

  • SwiftProtobufError or JSONDecodingError if decoding fails.

Parameters​

NameTypeSummary
jsonStringString
-
optionsJSONDecodingOptions
The JSONDecodingOptions to use.

Overload 1​

static func array<Bytes>(fromJSONUTF8Bytes jsonUTF8Bytes: Bytes, options: JSONDecodingOptions = JSONDecodingOptions()) throws -> [Self] where Bytes : SwiftProtobufContiguousBytes

Summary​

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

Throws​

  • SwiftProtobufError or JSONDecodingError if decoding fails.

Parameters​

NameTypeSummary
jsonStringString
-
optionsJSONDecodingOptions
The JSONDecodingOptions to use.

Overload 2​

static func array(fromJSONUTF8Data jsonUTF8Data: Data, options: JSONDecodingOptions = JSONDecodingOptions()) throws -> [Self]

Summary​

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

Throws​

  • SwiftProtobufError or JSONDecodingError if decoding fails.

Parameters​

NameTypeSummary
jsonStringString
-
optionsJSONDecodingOptions
The JSONDecodingOptions to use.

Overload 3​

static func array(fromJSONString jsonString: String, extensions: any ExtensionMap = SimpleExtensionMap(), options: JSONDecodingOptions = JSONDecodingOptions()) throws -> [Self]

Summary​

Creates a new array of messages by decoding the given string containing a
serialized array of messages in JSON format.

Throws​

  • SwiftProtobufError or JSONDecodingError if decoding fails.

Parameters​

NameTypeSummary
jsonStringString
-
optionsJSONDecodingOptions
The JSONDecodingOptions to use.

Overload 4​

static func array<Bytes>(fromJSONUTF8Bytes jsonUTF8Bytes: Bytes, extensions: any ExtensionMap = SimpleExtensionMap(), options: JSONDecodingOptions = JSONDecodingOptions()) throws -> [Self] where Bytes : SwiftProtobufContiguousBytes

Summary​

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

Throws​

  • SwiftProtobufError or JSONDecodingError if decoding fails.

Parameters​

NameTypeSummary
jsonStringString
-
optionsJSONDecodingOptions
The JSONDecodingOptions to use.

Overload 5​

static func array(fromJSONUTF8Data jsonUTF8Data: Data, extensions: any ExtensionMap = SimpleExtensionMap(), options: JSONDecodingOptions = JSONDecodingOptions()) throws -> [Self]

Summary​

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

Throws​

  • SwiftProtobufError or JSONDecodingError if decoding fails.

Parameters​

NameTypeSummary
jsonStringString
-
optionsJSONDecodingOptions
The JSONDecodingOptions to use.