JSONBodyProvider

public protocol JSONBodyProvider

A protocol that provides the body and key encoding strategy for JSON encoding.

  • The type of the body to be encoded.

    Declaration

    Swift

    associatedtype Body : Encodable
  • keyEncodingStrategy Default implementation

    The key encoding strategy to use for JSON encoding.

    Default Implementation

    The default key encoding strategy for JSON encoding.

    By default, this is set to .convertToSnakeCase.

    Declaration

    Swift

    var keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy { get }
  • The body to be encoded.

    Declaration

    Swift

    var body: Body { get }