1
0
mirror of https://github.com/json-iterator/go.git synced 2025-03-20 20:54:55 +02:00
This commit is contained in:
Tao Wen 2017-07-02 11:56:01 +08:00
parent bf002a02be
commit ed6c434851
2 changed files with 3 additions and 3 deletions

View File

@ -3,10 +3,10 @@ package jsoniter
import ( import (
"fmt" "fmt"
"reflect" "reflect"
"sort"
"strings" "strings"
"unicode" "unicode"
"unsafe" "unsafe"
"sort"
) )
var typeDecoders = map[string]ValDecoder{} var typeDecoders = map[string]ValDecoder{}

View File

@ -438,7 +438,7 @@ func (codec *base64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
} }
encoding := base64.StdEncoding encoding := base64.StdEncoding
src := iter.SkipAndReturnBytes() src := iter.SkipAndReturnBytes()
src = src[1: len(src)-1] src = src[1 : len(src)-1]
decodedLen := encoding.DecodedLen(len(src)) decodedLen := encoding.DecodedLen(len(src))
dst := make([]byte, decodedLen) dst := make([]byte, decodedLen)
len, err := encoding.Decode(dst, src) len, err := encoding.Decode(dst, src)
@ -588,7 +588,7 @@ func (encoder *marshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool {
type textMarshalerEncoder struct { type textMarshalerEncoder struct {
templateInterface emptyInterface templateInterface emptyInterface
checkIsEmpty checkIsEmpty checkIsEmpty checkIsEmpty
} }
func (encoder *textMarshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { func (encoder *textMarshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) {