1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-24 23:16:47 +02:00

#73 fix interface{} optimization for one ptr field struct and array

This commit is contained in:
Tao Wen
2017-06-26 22:37:24 +08:00
parent 85f7a1b0b3
commit dc44e85a86
5 changed files with 84 additions and 28 deletions

View File

@ -85,7 +85,6 @@ func (encoder *mapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) {
mapInterface.word = ptr
realInterface := (*interface{})(unsafe.Pointer(&mapInterface))
realVal := reflect.ValueOf(*realInterface)
stream.WriteObjectStart()
for i, key := range realVal.MapKeys() {
if i != 0 {