MCPcopy Index your code
hub / github.com/pquerna/ffjson / Encode

Method Encode

fflib/v1/buffer.go:276–284  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

274}
275
276func (b *Buffer) Encode(v interface{}) error {
277 if b.encoder == nil {
278 b.encoder = json.NewEncoder(b)
279 }
280 b.skipTrailingByte = true
281 err := b.encoder.Encode(v)
282 b.skipTrailingByte = false
283 return err
284}
285
286// WriteRune appends the UTF-8 encoding of Unicode code point r to the
287// buffer, returning its length and an error, which is always nil but is

Callers

nothing calls this directly

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected