PostgresNIO Documentation

Structure Postgres​Decoding​Context

public struct PostgresDecodingContext<JSONDecoder: PostgresJSONDecoder>  

A context that is passed to Swift objects that are decoded from the Postgres wire format. Used to pass further information to the decoding method.

Initializers

init(json​Decoder:​)

public init(jsonDecoder: JSONDecoder)  

Creates a PostgresDecodingContext with the given PostgresJSONDecoder. In case you want to use the a PostgresDecodingContext with an unconfigured Foundation JSONDecoder you can use the default context instead.

Parameters

json​Decoder JSONDecoder

A PostgresJSONDecoder to use when decoding objects from json

Properties

json​Decoder

public var jsonDecoder: JSONDecoder

A PostgresJSONDecoder used to decode the object from json.