version 2

This commit is contained in:
John Guo
2021-10-11 21:41:56 +08:00
parent bea54b445e
commit 1bc0635f8b
1053 changed files with 2892 additions and 2892 deletions

View File

@ -8,14 +8,14 @@
package gjson
import (
"github.com/gogf/gf/internal/utils"
"github.com/gogf/gf/v2/internal/utils"
"reflect"
"strconv"
"strings"
"github.com/gogf/gf/internal/rwmutex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/internal/rwmutex"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
)
const (

View File

@ -8,11 +8,11 @@ package gjson
import (
"fmt"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/v2/container/gvar"
)
// Interface returns the json value.

View File

@ -7,11 +7,11 @@
package gjson
import (
"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/v2/encoding/gini"
"github.com/gogf/gf/v2/encoding/gtoml"
"github.com/gogf/gf/v2/encoding/gxml"
"github.com/gogf/gf/v2/encoding/gyaml"
"github.com/gogf/gf/v2/internal/json"
)
// ========================================================================

View File

@ -8,20 +8,20 @@ package gjson
import (
"bytes"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"reflect"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/v2/internal/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/rwmutex"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/encoding/gini"
"github.com/gogf/gf/v2/encoding/gtoml"
"github.com/gogf/gf/v2/encoding/gxml"
"github.com/gogf/gf/v2/encoding/gyaml"
"github.com/gogf/gf/v2/internal/rwmutex"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/util/gconv"
)
// New creates a Json object with any variable type of <data>, but <data> should be a map

View File

@ -8,8 +8,8 @@ package gjson
import (
"bytes"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/util/gconv"
)
// Valid checks whether <data> is a valid JSON data type.

View File

@ -10,7 +10,7 @@ import (
json2 "encoding/json"
"testing"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
var (

View File

@ -8,7 +8,7 @@ package gjson_test
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
func Example_conversionNormalFormats() {

View File

@ -8,7 +8,7 @@ package gjson_test
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
func Example_dataSetCreate1() {

View File

@ -8,8 +8,8 @@ package gjson_test
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/encoding/gjson"
)
func Example_loadJson() {

View File

@ -8,7 +8,7 @@ package gjson_test
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
func Example_newFromJson() {

View File

@ -8,7 +8,7 @@ package gjson_test
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
func Example_patternGet() {

View File

@ -7,12 +7,12 @@
package gjson_test
import (
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/v2/container/gmap"
"testing"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_New(t *testing.T) {

View File

@ -7,13 +7,13 @@
package gjson_test
import (
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/util/gconv"
"testing"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
)
func TestJson_UnmarshalJSON(t *testing.T) {

View File

@ -7,7 +7,7 @@
package gjson
import (
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/test/gtest"
"testing"
)

View File

@ -7,10 +7,10 @@
package gjson_test
import (
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/text/gstr"
"testing"
)

View File

@ -9,10 +9,10 @@ package gjson_test
import (
"testing"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Load_JSON1(t *testing.T) {

View File

@ -9,8 +9,8 @@ package gjson_test
import (
"testing"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_NewWithTag(t *testing.T) {

View File

@ -8,12 +8,12 @@ package gjson_test
import (
"bytes"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/text/gstr"
"testing"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
func Test_Set1(t *testing.T) {

View File

@ -7,8 +7,8 @@
package gjson_test
import (
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/test/gtest"
"testing"
)