Extension (Class)vapor 4.106.7all tags
JSONEncoder (ext)
You’re viewing third-party extensions to JSONEncoder
, a class from the Swift standard library.
You can also read the documentation forJSONEncoder
itself.
extension JSONEncoder
You’re viewing third-party extensions to JSONEncoder
, a class from the Swift standard library.
You can also read the documentation forJSONEncoder
itself.
extension JSONEncoder
class JSONEncoder
JSONEncoder
facilitates the encoding of Encodable
values into JSON.
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol ContentEncoder : Sendable
Conform a type to this protocol to make it usable for encoding data via Vapor’s ContentConfiguration
system.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable
static func custom(dates dateStrategy: JSONEncoder.DateEncodingStrategy? = nil, data dataStrategy: JSONEncoder.DataEncodingStrategy? = nil, keys keyStrategy: JSONEncoder.KeyEncodingStrategy? = nil, format outputFormatting: JSONEncoder.OutputFormatting? = nil, floats floatStrategy: JSONEncoder.NonConformingFloatEncodingStrategy? = nil, userInfo: [CodingUserInfoKey : Any]? = nil) -> JSONEncoder
Convenience for creating a customized JSONEncoder
.
func encode<E>(_ encodable: E, to body: inout ByteBuffer, headers: inout HTTPHeaders) throws where E : Encodable
func encode<E>(_ encodable: E, to body: inout ByteBuffer, headers: inout HTTPHeaders, userInfo: [CodingUserInfoKey : Sendable]) throws where E : Encodable
func encode<E>(_ encodable: E, to body: inout ByteBuffer, headers: inout HTTPHeaders, userInfo: [CodingUserInfoKey : Sendable]) throws where E : Encodable