This commit is contained in:
crusader 2018-03-23 11:28:59 +09:00
parent 6e59e6b669
commit b77b975069
7 changed files with 21 additions and 7 deletions

View File

@ -6,3 +6,5 @@ import:
- package: gopkg.in/natefinch/npipe.v2 - package: gopkg.in/natefinch/npipe.v2
- package: git.loafle.net/commons_go/websocket_fasthttp - package: git.loafle.net/commons_go/websocket_fasthttp
- package: git.loafle.net/commons_go/util - package: git.loafle.net/commons_go/util
- package: github.com/json-iterator/go
version: 1.1.3

View File

@ -1,13 +1,15 @@
package json package json
import ( import (
"encoding/json"
"io" "io"
"git.loafle.net/commons_go/rpc/codec" "git.loafle.net/commons_go/rpc/codec"
"git.loafle.net/commons_go/rpc/protocol" "git.loafle.net/commons_go/rpc/protocol"
jsoniter "github.com/json-iterator/go"
) )
var json = jsoniter.ConfigCompatibleWithStandardLibrary
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Codec // Codec
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -1,13 +1,14 @@
package json package json
import ( import (
"encoding/json"
"git.loafle.net/commons_go/rpc/codec" "git.loafle.net/commons_go/rpc/codec"
crp "git.loafle.net/commons_go/rpc/protocol" crp "git.loafle.net/commons_go/rpc/protocol"
cuej "git.loafle.net/commons_go/util/encoding/json" cuej "git.loafle.net/commons_go/util/encoding/json"
jsoniter "github.com/json-iterator/go"
) )
var json = jsoniter.ConfigCompatibleWithStandardLibrary
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ClientNotificationCodec // ClientNotificationCodec
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -1,15 +1,17 @@
package json package json
import ( import (
"encoding/json"
"fmt" "fmt"
"io" "io"
"git.loafle.net/commons_go/rpc/codec" "git.loafle.net/commons_go/rpc/codec"
"git.loafle.net/commons_go/rpc/protocol" "git.loafle.net/commons_go/rpc/protocol"
crp "git.loafle.net/commons_go/rpc/protocol" crp "git.loafle.net/commons_go/rpc/protocol"
jsoniter "github.com/json-iterator/go"
) )
var json = jsoniter.ConfigCompatibleWithStandardLibrary
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ClientResponseCodec // ClientResponseCodec
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -1,13 +1,15 @@
package json package json
import ( import (
"encoding/json"
"io" "io"
"git.loafle.net/commons_go/rpc/codec" "git.loafle.net/commons_go/rpc/codec"
"git.loafle.net/commons_go/rpc/protocol" "git.loafle.net/commons_go/rpc/protocol"
jsoniter "github.com/json-iterator/go"
) )
var json = jsoniter.ConfigCompatibleWithStandardLibrary
var null = json.RawMessage([]byte("null")) var null = json.RawMessage([]byte("null"))
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -1,15 +1,17 @@
package json package json
import ( import (
"encoding/json"
"io" "io"
"git.loafle.net/commons_go/rpc/codec" "git.loafle.net/commons_go/rpc/codec"
"git.loafle.net/commons_go/rpc/protocol" "git.loafle.net/commons_go/rpc/protocol"
crp "git.loafle.net/commons_go/rpc/protocol" crp "git.loafle.net/commons_go/rpc/protocol"
cuej "git.loafle.net/commons_go/util/encoding/json" cuej "git.loafle.net/commons_go/util/encoding/json"
jsoniter "github.com/json-iterator/go"
) )
var json = jsoniter.ConfigCompatibleWithStandardLibrary
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Request // Request
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -1,13 +1,16 @@
package json package json
import ( import (
"encoding/json"
"fmt" "fmt"
"reflect" "reflect"
jsoniter "github.com/json-iterator/go"
cur "git.loafle.net/commons_go/util/reflect" cur "git.loafle.net/commons_go/util/reflect"
) )
var json = jsoniter.ConfigCompatibleWithStandardLibrary
func convertParamsToStringArray(params []interface{}) ([]string, error) { func convertParamsToStringArray(params []interface{}) ([]string, error) {
var values []string var values []string
if nil == params || 0 == len(params) { if nil == params || 0 == len(params) {