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: git.loafle.net/commons_go/websocket_fasthttp
- 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
import (
"encoding/json"
"io"
"git.loafle.net/commons_go/rpc/codec"
"git.loafle.net/commons_go/rpc/protocol"
jsoniter "github.com/json-iterator/go"
)
var json = jsoniter.ConfigCompatibleWithStandardLibrary
// ----------------------------------------------------------------------------
// Codec
// ----------------------------------------------------------------------------

View File

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

View File

@ -1,15 +1,17 @@
package json
import (
"encoding/json"
"fmt"
"io"
"git.loafle.net/commons_go/rpc/codec"
"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
// ----------------------------------------------------------------------------

View File

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

View File

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

View File

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