1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-20 11:28:49 +02:00
This commit is contained in:
Tao Wen 2017-06-19 23:43:53 +08:00
parent c3f5a2c536
commit f5edf564c8
25 changed files with 44 additions and 48 deletions

@ -43,7 +43,6 @@ func Get(data []byte, path ...interface{}) Any {
return ConfigDefault.Get(data, path...)
}
// Marshal adapts to json/encoding Marshal API
//
// Marshal returns the JSON encoding of v, adapts to json/encoding Marshal API

@ -2,8 +2,8 @@ package jsoniter
import (
"fmt"
"reflect"
"io"
"reflect"
)
type Any interface {

@ -4,7 +4,6 @@ import (
"strconv"
)
type floatAny struct {
baseAny
val float64

@ -1,8 +1,8 @@
package jsoniter
import (
"strconv"
"fmt"
"strconv"
)
type stringAny struct {

@ -1,12 +1,12 @@
package jsoniter
import (
"encoding/json"
"errors"
"io"
"reflect"
"sync/atomic"
"unsafe"
"encoding/json"
)
type Config struct {

@ -1,10 +1,10 @@
package jsoniter
import (
"fmt"
"io"
"reflect"
"unsafe"
"io"
"fmt"
)
func decoderOfArray(cfg *frozenConfig, typ reflect.Type) (Decoder, error) {

@ -1,8 +1,8 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"testing"
)
func Test_read_empty_array_as_any(t *testing.T) {

@ -1,8 +1,8 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"testing"
)
func Test_read_bool_as_any(t *testing.T) {

@ -1,8 +1,8 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"testing"
)
func Test_read_float_as_any(t *testing.T) {

@ -1,9 +1,9 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"io"
"testing"
)
func Test_read_int64_as_any(t *testing.T) {

@ -1,8 +1,8 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"testing"
)
func Test_wrap_map(t *testing.T) {

@ -1,8 +1,8 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"testing"
)
func Test_read_null_as_any(t *testing.T) {

@ -1,8 +1,8 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"testing"
)
func Test_read_object_as_any(t *testing.T) {

@ -1,8 +1,8 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"testing"
)
func Test_read_string_as_any(t *testing.T) {

@ -1,9 +1,9 @@
package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
"encoding/json"
"github.com/json-iterator/go/require"
"testing"
)
func Test_encode_fixed_array(t *testing.T) {

@ -120,4 +120,3 @@ func Test_encode_map_with_sorted_keys(t *testing.T) {
should.Nil(err)
should.Equal(string(bytes), output)
}

@ -2,9 +2,9 @@ package jsoniter
import (
"bytes"
"fmt"
"github.com/json-iterator/go/require"
"testing"
"fmt"
)
func Test_empty_object(t *testing.T) {

@ -1,9 +1,9 @@
package jsoniter
import (
"testing"
"encoding/json"
"github.com/json-iterator/go/require"
"testing"
)
func Test_json_RawMessage(t *testing.T) {
@ -38,7 +38,6 @@ func Test_json_RawMessage_in_struct(t *testing.T) {
should.Equal(`hello`, data.Field1)
}
func Test_decode_map_of_raw_message(t *testing.T) {
should := require.New(t)
type RawMap map[string]*json.RawMessage

@ -1,10 +1,10 @@
package jsoniter
import (
"encoding/json"
"testing"
"github.com/json-iterator/go/require"
"bytes"
"encoding/json"
"github.com/json-iterator/go/require"
"testing"
)
func Test_skip_number(t *testing.T) {