1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

suport encode interface

This commit is contained in:
Tao Wen
2017-01-26 00:25:17 +08:00
parent ce1a1f1e98
commit 9b587c0f22
10 changed files with 188 additions and 21 deletions

View File

@ -49,6 +49,10 @@ func (encoder *sliceEncoder) encode(ptr unsafe.Pointer, stream *Stream) {
}
}
func (encoder *sliceEncoder) encodeInterface(val interface{}, stream *Stream) {
WriteToStream(val, stream, encoder)
}
type sliceDecoder struct {
sliceType reflect.Type
elemType reflect.Type