Instance Methodorlandos-nl.ikigajson 2.2.3IkigaJSON
decode(_:from:)
Parses the Decodable type from [UInt8]
. This is the equivalent for JSONDecoder’s Decode function.
func decode<D, S>(_: D.Type, from string: S) throws -> D where D : Decodable, S : StringProtocol
Other members in extension
Type members
Instance members
var settings: JSONDecoderSettings
These settings can be used to alter the decoding process.
func decode<D>(D.Type, from: Data
) throws -> D Parses the Decodable type from
Data
. This is the equivalent for JSONDecoder’s Decode function.func decode<D>(D.Type, from: ByteBuffer
) throws -> D Parses the Decodable type from a SwiftNIO
ByteBuffer
.func decode<D>(D.Type, from: JSONObject
) throws -> D Parses the Decodable type from a JSONObject.
func decode<D>(D.Type, from: JSONArray
) throws -> D Parses the Decodable type from a JSONArray.
func decode<D>(D.Type, from: UnsafeBufferPointer<UInt8>
) throws -> D Parses the Decodable type from an UnsafeBufferPointer. This API can be used when the data wasn’t originally available as
Data
so you remove the need for copying data. This can save a lot of performance.func decode<D, S>(D.Type, from: S
) throws -> D Parses the Decodable type from
[UInt8]
. This is the equivalent for JSONDecoder’s Decode function.func parse<D>(D.Type, from: inout ByteBuffer, settings: JSONDecoderSettings
) throws -> D