code: func (stream *Stream) WriteVal(val interface{}) {
  	if nil == val {
  		stream.WriteNil()
  		return
  	}
  	cacheKey := reflect2.RTypeOf(val)
  	encoder := stream.cfg.getEncoderFromCache(cacheKey)
  	if encoder == nil {
  		typ := reflect2.TypeOf(val)
  		encoder = stream.cfg.EncoderOf(typ)
  	}
  	encoder.Encode(reflect2.PtrOf(val), stream)
  }
docs: // WriteVal copy the go interface into underlying JSON, same as json.Marshal