expose DecoderOf and EncoderOf

This commit is contained in:
Tao Wen committed 2018-03-14 23:18:20 +08:00
1 parent 25fa392355
commit 39acec93e0
1 file changed
+2
+2
View File
@@ -40,6 +40,8 @@ type API interface {
NewDecoder(reader io.Reader) *Decoder
Valid(data []byte) bool
RegisterExtension(extension Extension)
DecoderOf(typ reflect2.Type) ValDecoder
EncoderOf(typ reflect2.Type) ValEncoder
}
// ConfigDefault the default API