mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
import third-party library json-iterator to improve the performance for json operations
This commit is contained in:
@ -10,9 +10,9 @@ package gini
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
"io"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
package gjson
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/gogf/gf/encoding/gini"
|
||||
"github.com/gogf/gf/encoding/gtoml"
|
||||
"github.com/gogf/gf/encoding/gxml"
|
||||
"github.com/gogf/gf/encoding/gyaml"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
"github.com/gogf/gf/util/gconv"
|
||||
)
|
||||
|
||||
|
||||
@ -8,9 +8,9 @@ package gjson
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/encoding/gini"
|
||||
|
||||
@ -8,7 +8,7 @@ package gjson
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
"github.com/gogf/gf/util/gconv"
|
||||
)
|
||||
|
||||
|
||||
@ -246,7 +246,7 @@ func Test_Append(t *testing.T) {
|
||||
|
||||
func TestJson_ToJson(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
p := gjson.New("1")
|
||||
p := gjson.New(1)
|
||||
s, e := p.ToJsonString()
|
||||
t.Assert(e, nil)
|
||||
t.Assert(s, "1")
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package gjson_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
"github.com/gogf/gf/util/gconv"
|
||||
"testing"
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ package gtoml
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
)
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
package gyaml
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/gogf/gf/util/gconv"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package gyaml_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/gogf/gf/internal/json"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/encoding/gparser"
|
||||
|
||||
Reference in New Issue
Block a user