Benchmark marshal (#550)

This commit is contained in:
Thomas Pelletier
2021-06-02 09:29:19 -04:00
committed by GitHub
parent b0d6c62255
commit f3bb20ea79
6 changed files with 246 additions and 78 deletions
+3
View File
@@ -641,6 +641,9 @@ func (enc *Encoder) encodeTableInline(b []byte, ctx encoderCtx, t table) ([]byte
}
func willConvertToTable(ctx encoderCtx, v reflect.Value) bool {
if !v.IsValid() {
return false
}
if v.Type() == timeType || v.Type().Implements(textMarshalerType) {
return false
}