func (enc *jsonEncoder) AddUint(key string, val uint) {
	enc.AddUint64(key, uint64(val))
}
AddUint adds a string key and integer value to the encoder's fields. The key
is JSON-escaped.
package zap
import (
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"math"
	"strconv"
	"sync"
	"time"
	"unicode/utf8"
)
const (
	_hex = "0123456789abcdef"
	_initialBufSize = 1024
)
var (
	errNilSink = errors.New("can't write encoded message a nil WriteSyncer")
	defaultMessageF = MessageKey("msg")
	defaultTimeF    = EpochFormatter("ts")
	defaultLevelF   = LevelString("level")
	jsonPool = sync.Pool{New: func() interface{} {
		return &jsonEncoder{
			bytes: make([]byte, 0, _initialBufSize),
		}
	}}
)
type jsonEncoder struct {
	bytes    []byte
	messageF MessageFormatter
	timeF    TimeFormatter
	levelF   LevelFormatter
}
func NewJSONEncoder(options ...JSONOption) Encoder {
	enc := jsonPool.Get().(*jsonEncoder)
	enc.truncate()
	enc.messageF = defaultMessageF
	enc.timeF = defaultTimeF
	enc.levelF = defaultLevelF
	for _, opt := range options {
		opt.apply(enc)
	}
	return enc
}
func (enc *jsonEncoder) Free() {
	jsonPool.Put(enc)
}
func (enc *jsonEncoder) AddString(key, val string) {
	enc.addKey(key)
	enc.bytes = append(enc.bytes, '"')
	enc.safeAddString(val)
	enc.bytes = append(enc.bytes, '"')
}
func (enc *jsonEncoder) AddBool(key string, val bool) {
	enc.addKey(key)
	enc.bytes = strconv.AppendBool(enc.bytes, val)
}
func (enc *jsonEncoder) AddInt(key string, val int) {
	enc.AddInt64(key, int64(val))
}
func (enc *jsonEncoder) AddInt64(key string, val int64) {
	enc.addKey(key)
	enc.bytes = strconv.AppendInt(enc.bytes, val, 10)
}