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

@ -8,10 +8,10 @@ package garray
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/gogf/gf/internal/empty"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/text/gstr"
"math"
"sort"

View File

@ -8,9 +8,9 @@ package garray
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/gogf/gf/internal/json"
"math"
"sort"

View File

@ -8,9 +8,9 @@ package garray
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/text/gstr"
"math"
"sort"

View File

@ -8,9 +8,9 @@ package garray
import (
"bytes"
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/empty"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gutil"
"math"

View File

@ -8,8 +8,8 @@ package garray
import (
"bytes"
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"math"
"sort"

View File

@ -8,7 +8,7 @@ package garray
import (
"bytes"
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/text/gstr"
"math"
"sort"

View File

@ -9,8 +9,8 @@
package garray_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"testing"
"time"

View File

@ -9,8 +9,8 @@
package garray_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"testing"
"time"

View File

@ -9,8 +9,8 @@
package garray_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"strings"
"testing"
"time"

View File

@ -9,8 +9,8 @@
package garray_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gutil"
"strings"
"testing"

View File

@ -9,8 +9,8 @@
package garray_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"testing"
"time"

View File

@ -9,8 +9,8 @@
package garray_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"testing"
"time"

View File

@ -11,7 +11,7 @@ package glist
import (
"bytes"
"container/list"
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/internal/rwmutex"

View File

@ -8,7 +8,7 @@ package glist
import (
"container/list"
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"

View File

@ -7,7 +7,7 @@
package gmap
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/empty"

View File

@ -8,7 +8,7 @@
package gmap
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/empty"

View File

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

View File

@ -7,7 +7,7 @@
package gmap
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/empty"

View File

@ -8,7 +8,7 @@
package gmap
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/empty"

View File

@ -8,7 +8,7 @@
package gmap
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/empty"
"github.com/gogf/gf/internal/rwmutex"

View File

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

View File

@ -7,7 +7,7 @@
package gmap
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/empty"

View File

@ -7,10 +7,10 @@
package gmap_test
import (
"encoding/json"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -7,9 +7,9 @@
package gmap_test
import (
"encoding/json"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -7,9 +7,9 @@
package gmap_test
import (
"encoding/json"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -7,9 +7,9 @@
package gmap_test
import (
"encoding/json"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"testing"

View File

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

View File

@ -7,9 +7,9 @@
package gmap_test
import (
"encoding/json"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -7,9 +7,9 @@
package gmap_test
import (
"encoding/json"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -7,9 +7,9 @@
package gmap_test
import (
"encoding/json"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"testing"

View File

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

View File

@ -9,7 +9,7 @@ package gset
import (
"bytes"
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/rwmutex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"

View File

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

View File

@ -9,7 +9,7 @@ package gset
import (
"bytes"
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/rwmutex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"

View File

@ -9,8 +9,8 @@
package gset_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"strings"
"sync"

View File

@ -9,8 +9,8 @@
package gset_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"strings"
"sync"

View File

@ -9,8 +9,8 @@
package gset_test
import (
"encoding/json"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"strings"
"sync"

View File

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

View File

@ -8,8 +8,8 @@ package gtree
import (
"bytes"
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"strings"
"github.com/gogf/gf/util/gconv"

View File

@ -7,8 +7,8 @@
package gtree
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gutil"

View File

@ -7,7 +7,7 @@
package gtype
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"sync/atomic"
)

View File

@ -9,8 +9,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"testing"
)

View File

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

View File

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

View File

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

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"math"

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"math"

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"math"

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"math"

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"sync"

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"testing"

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"math"

View File

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

View File

@ -7,8 +7,8 @@
package gtype_test
import (
"encoding/json"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gconv"
"sync"

View File

@ -7,7 +7,7 @@
package gvar
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"time"
"github.com/gogf/gf/internal/empty"

View File

@ -7,8 +7,8 @@
package gvar_test
import (
"encoding/json"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/test/gtest"
"math"
"testing"

View File

@ -14,6 +14,7 @@ import (
"github.com/gogf/gf/test/gtest"
)
// TODO
func Test_Table_Join(t *testing.T) {
var (
tableUser = "user_" + gtime.TimestampMicroStr()
@ -22,7 +23,7 @@ func Test_Table_Join(t *testing.T) {
if _, err := db.Exec(fmt.Sprintf(`
CREATE TABLE %s (
uid int(10) unsigned NOT NULL AUTO_INCREMENT,
name varchar(45) NOT NULL COMMENT,
name varchar(45) NOT NULL,
PRIMARY KEY (uid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`, tableUser)); err != nil {
@ -33,7 +34,7 @@ CREATE TABLE %s (
if _, err := db.Exec(fmt.Sprintf(`
CREATE TABLE %s (
uid int(10) unsigned NOT NULL AUTO_INCREMENT,
name varchar(45) NOT NULL COMMENT,
name varchar(45) NOT NULL,
PRIMARY KEY (uid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`, tableUserDetail)); err != nil {
@ -54,6 +55,5 @@ CREATE TABLE %s (
User *EntityUser
UserDetail *EntityUserDetail
}
})
}

View File

@ -7,8 +7,8 @@
package gredis
import (
"encoding/json"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/internal/json"
"reflect"
)

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"

1
go.mod
View File

@ -11,6 +11,7 @@ require (
github.com/gorilla/websocket v1.4.1
github.com/gqcn/structs v1.1.1
github.com/grokify/html-strip-tags-go v0.0.0-20190921062105-daaa06bf1aaf
github.com/json-iterator/go v1.1.10
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/olekukonko/tablewriter v0.0.1
golang.org/x/sys v0.0.0-20200610111108-226ff32320da // indirect

69
internal/json/json.go Normal file
View File

@ -0,0 +1,69 @@
// Copyright 2020 gf Author(https://github.com/gogf/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
// Package json provides json operations wrapping ignoring stdlib or third-party lib json.
package json
import (
json2 "encoding/json"
"github.com/json-iterator/go"
"io"
)
// ConfigCompatibleWithStandardLibrary tries to be 90% compatible
// with standard library behavior.
var json = jsoniter.ConfigCompatibleWithStandardLibrary
// Marshal adapts to json/encoding Marshal API.
//
// Marshal returns the JSON encoding of v, adapts to json/encoding Marshal API
// Refer to https://godoc.org/encoding/json#Marshal for more information.
func Marshal(v interface{}) ([]byte, error) {
return json.Marshal(v)
}
// MarshalToString convenient method to write as string instead of []byte.
func MarshalToString(v interface{}) (string, error) {
return json.MarshalToString(v)
}
// MarshalIndent same as json.MarshalIndent. Prefix is not supported.
func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) {
return json2.MarshalIndent(v, prefix, indent)
}
// UnmarshalFromString is a convenient method to read from string instead of []byte.
func UnmarshalFromString(str string, v interface{}) error {
return json.UnmarshalFromString(str, v)
}
// Unmarshal adapts to json/encoding Unmarshal API
//
// Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v.
// Refer to https://godoc.org/encoding/json#Unmarshal for more information.
func Unmarshal(data []byte, v interface{}) error {
return json.Unmarshal(data, v)
}
// NewEncoder same as json.NewEncoder
func NewEncoder(writer io.Writer) *jsoniter.Encoder {
return json.NewEncoder(writer)
}
// NewDecoder adapts to json/stream NewDecoder API.
//
// NewDecoder returns a new decoder that reads from r.
//
// Instead of a json/encoding Decoder, an Decoder is returned
// Refer to https://godoc.org/encoding/json#NewDecoder for more information.
func NewDecoder(reader io.Reader) *jsoniter.Decoder {
return json.NewDecoder(reader)
}
// Valid reports whether data is a valid JSON encoding.
func Valid(data []byte) bool {
return json.Valid(data)
}

View File

@ -8,9 +8,9 @@ package ghttp
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/utils"
"io"
"io/ioutil"

View File

@ -8,12 +8,12 @@ package ghttp
import (
"bytes"
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/encoding/gurl"
"github.com/gogf/gf/encoding/gxml"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/utils"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/text/gstr"

View File

@ -8,8 +8,8 @@
package ghttp
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"net/http"
"github.com/gogf/gf/encoding/gparser"

View File

@ -7,8 +7,8 @@
package ghttp
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"strings"
"github.com/gogf/gf/container/glist"

View File

@ -7,8 +7,8 @@
package ghttp_test
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"testing"
"time"

View File

@ -8,11 +8,11 @@
package gbuild
import (
"encoding/json"
"github.com/gogf/gf"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/encoding/gbase64"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"runtime"
)

View File

@ -8,8 +8,8 @@
package gcmd
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"os"
"strings"

View File

@ -7,8 +7,8 @@
package gproc
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"net"
"github.com/gogf/gf/container/gqueue"

View File

@ -7,8 +7,8 @@
package gproc
import (
"encoding/json"
"errors"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/net/gtcp"
"io"
)

View File

@ -9,7 +9,7 @@ package gres
import (
"archive/zip"
"bytes"
"encoding/json"
"github.com/gogf/gf/internal/json"
"io"
"os"
)

View File

@ -7,10 +7,10 @@
package gsession
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/internal/json"
"os"
"time"

View File

@ -7,10 +7,10 @@
package gsession
import (
"encoding/json"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/database/gredis"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/internal/json"
"time"
"github.com/gogf/gf/os/gtimer"

View File

@ -7,7 +7,7 @@
package gtime_test
import (
"encoding/json"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/test/gtest"
"testing"

17
other/test.go Normal file
View File

@ -0,0 +1,17 @@
package main
import (
"fmt"
)
import jsoniter "github.com/json-iterator/go"
var json = jsoniter.ConfigCompatibleWithStandardLibrary
func main() {
body := "{\"id\": 413231383385427875}"
m := make(map[string]interface{})
json.Unmarshal([]byte(body), &m)
b, _ := json.Marshal(m)
fmt.Println(string(b))
}

View File

@ -10,9 +10,9 @@
package gconv
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/intstore"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/os/gtime"
"reflect"
"strconv"

View File

@ -7,9 +7,9 @@
package gconv
import (
"encoding/json"
"errors"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/json"
"reflect"
"strings"

View File

@ -7,10 +7,10 @@
package gconv
import (
"encoding/json"
"errors"
"fmt"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/json"
"reflect"
)

View File

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

View File

@ -8,8 +8,8 @@ package gutil
import (
"bytes"
"encoding/json"
"fmt"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"os"
"reflect"