MCPcopy Create free account
hub / github.com/francoispqt/gojay / EncodeInt64

Method EncodeInt64

encode_number_int.go:25–35  ·  view source on GitHub ↗

EncodeInt64 encodes an int64 to JSON

(n int64)

Source from the content-addressed store, hash-verified

23
24// EncodeInt64 encodes an int64 to JSON
25func (enc *Encoder) EncodeInt64(n int64) error {
26 if enc.isPooled == 1 {
27 panic(InvalidUsagePooledEncoderError("Invalid usage of pooled encoder"))
28 }
29 _, _ = enc.encodeInt64(n)
30 _, err := enc.Write()
31 if err != nil {
32 return err
33 }
34 return nil
35}
36
37// encodeInt64 encodes an int to JSON
38func (enc *Encoder) encodeInt64(n int64) ([]byte, error) {

Callers 3

EncodeMethod · 0.95

Calls 3

encodeInt64Method · 0.95
WriteMethod · 0.95

Tested by 2