Instance Methodswift-nio 2.72.0NIOFoundationCompat->Foundation
encode(_:into:)
Writes a JSON-encoded representation of the value you supply into the supplied ByteBuffer
.
func encode<T>(_ value: T, into buffer: inout ByteBuffer) throws where T : Encodable
Parameters
Other members in extension
Instance members
func encodeAsByteBuffer<T>(T, allocator: ByteBufferAllocator
) throws -> ByteBuffer Writes a JSON-encoded representation of the value you supply into a
ByteBuffer
that is freshly allocated.