encodeInt encodes an int to JSON
(n int)
| 17 | |
| 18 | // encodeInt encodes an int to JSON |
| 19 | func (enc *Encoder) encodeInt(n int) ([]byte, error) { |
| 20 | enc.buf = strconv.AppendInt(enc.buf, int64(n), 10) |
| 21 | return enc.buf, nil |
| 22 | } |
| 23 | |
| 24 | // EncodeInt64 encodes an int64 to JSON |
| 25 | func (enc *Encoder) EncodeInt64(n int64) error { |