MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / UseArrayEncodedStructs

Method UseArrayEncodedStructs

encode.go:162–168  ·  view source on GitHub ↗

UseArrayEncodedStructs causes the Encoder to encode Go structs as msgpack arrays.

(on bool)

Source from the content-addressed store, hash-verified

160
161// UseArrayEncodedStructs causes the Encoder to encode Go structs as msgpack arrays.
162func (e *Encoder) UseArrayEncodedStructs(on bool) {
163 if on {
164 e.flags |= arrayEncodedStructsFlag
165 } else {
166 e.flags &= ^arrayEncodedStructsFlag
167 }
168}
169
170// UseCompactEncoding causes the Encoder to chose the most compact encoding.
171// For example, it allows to encode small Go int64 as msgpack int8 saving 7 bytes.

Callers 1

Calls

no outgoing calls

Tested by 1