This commit is contained in:
John Guo
2025-04-10 14:12:35 +08:00
parent 1534abdb05
commit 2cc4835c49
1311 changed files with 4587 additions and 4587 deletions

View File

@ -12,13 +12,13 @@ import (
"strconv"
"strings"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/reflection"
"github.com/gogf/gf/v2/internal/rwmutex"
"github.com/gogf/gf/v2/internal/utils"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/internal/reflection"
"github.com/gogf/gf/v3/internal/rwmutex"
"github.com/gogf/gf/v3/internal/utils"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
)
type ContentType string

View File

@ -9,10 +9,10 @@ package gjson
import (
"fmt"
"github.com/gogf/gf/v2/container/gvar"
"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/v3/container/gvar"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/util/gutil"
)
// Interface returns the json value.

View File

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

View File

@ -9,9 +9,9 @@ package gjson
import (
"reflect"
"github.com/gogf/gf/v2/internal/reflection"
"github.com/gogf/gf/v2/internal/rwmutex"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/internal/reflection"
"github.com/gogf/gf/v3/internal/rwmutex"
"github.com/gogf/gf/v3/util/gconv"
)
// New creates a Json object with any variable type of `data`, but `data` should be a map

View File

@ -9,16 +9,16 @@ package gjson
import (
"bytes"
"github.com/gogf/gf/v2/encoding/gini"
"github.com/gogf/gf/v2/encoding/gproperties"
"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/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/encoding/gini"
"github.com/gogf/gf/v3/encoding/gproperties"
"github.com/gogf/gf/v3/encoding/gtoml"
"github.com/gogf/gf/v3/encoding/gxml"
"github.com/gogf/gf/v3/encoding/gyaml"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/internal/json"
"github.com/gogf/gf/v3/text/gregex"
"github.com/gogf/gf/v3/text/gstr"
)
// LoadWithOptions creates a Json object from given JSON format content and options.

View File

@ -6,7 +6,7 @@
package gjson
import "github.com/gogf/gf/v2/os/gfile"
import "github.com/gogf/gf/v3/os/gfile"
// Load loads content from specified file `path`, and creates a Json object from its content.
// Deprecated: use LoadPath instead.

View File

@ -9,9 +9,9 @@ package gjson
import (
"bytes"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/internal/json"
"github.com/gogf/gf/v3/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/v2/encoding/gjson"
"github.com/gogf/gf/v3/encoding/gjson"
)
var (

View File

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

View File

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

View File

@ -9,8 +9,8 @@ package gjson_test
import (
"fmt"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v3/encoding/gjson"
"github.com/gogf/gf/v3/test/gtest"
)
func ExampleLoad() {

View File

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

View File

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

View File

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

View File

@ -9,10 +9,10 @@ package gjson_test
import (
"testing"
"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"
"github.com/gogf/gf/v3/encoding/gjson"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/text/gstr"
)
func Test_ToJson(t *testing.T) {

View File

@ -9,10 +9,10 @@ package gjson_test
import (
"testing"
"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"
"github.com/gogf/gf/v3/encoding/gjson"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/os/gfile"
"github.com/gogf/gf/v3/test/gtest"
)
func Test_Load_JSON1(t *testing.T) {

View File

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

View File

@ -10,11 +10,11 @@ import (
"bytes"
"testing"
"github.com/gogf/gf/v2/container/garray"
"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"
"github.com/gogf/gf/v3/container/garray"
"github.com/gogf/gf/v3/encoding/gjson"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/text/gstr"
)
func Test_Set1(t *testing.T) {

View File

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

View File

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

View File

@ -9,7 +9,7 @@ package gjson
import (
"testing"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v3/test/gtest"
)
func Test_checkDataType(t *testing.T) {

View File

@ -10,13 +10,13 @@ import (
"fmt"
"testing"
"github.com/gogf/gf/v2/container/gmap"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/container/gmap"
"github.com/gogf/gf/v3/container/gvar"
"github.com/gogf/gf/v3/encoding/gjson"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/os/gtime"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/util/gconv"
)
func Test_New(t *testing.T) {