import third-party library json-iterator to improve the performance for json operations

This commit is contained in:
John
2020-06-17 21:16:25 +08:00
parent 9e9865afa7
commit b2aa59d893
89 changed files with 175 additions and 88 deletions

View File

@ -10,9 +10,9 @@ package gini
import (
"bufio"
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/gogf/gf/internal/json"
"io"
"strings"
)

View File

@ -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"
)

View File

@ -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"

View File

@ -8,7 +8,7 @@ package gjson
import (
"bytes"
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
)

View File

@ -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")

View File

@ -7,7 +7,7 @@
package gjson_test
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -9,7 +9,7 @@ package gtoml
import (
"bytes"
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/BurntSushi/toml"
)

View File

@ -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"

View File

@ -7,7 +7,7 @@
package gyaml_test
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"testing"
"github.com/gogf/gf/encoding/gparser"