summaryrefslogtreecommitdiff
path: root/protocol.go
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-21 09:55:16 +0000
committerGitHub <[email protected]>2020-03-21 09:55:16 +0000
commitaafa0af51ff0c9e504486b593d45fcc0e3c778fc (patch)
tree92f4aaf0ee8855385780d4e6d35adca44634eba0 /protocol.go
parentca497b21bcc33361867d16e1709c55f0313128a7 (diff)
parenta3f07d7bc55031cacccfd3dcbdf93d7e53d3479c (diff)
Merge #282
282: Replace std json package with github.com/json-iterator/go r=48d90782 a=48d90782 resolves #281 1. Add `go vendor` command to Makefile as workaround for php vendor folder + go vendor folder hack 2. Use faster json package instead of std 3. Update GHA Co-authored-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'protocol.go')
-rw-r--r--protocol.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocol.go b/protocol.go
index 42649264..b2836289 100644
--- a/protocol.go
+++ b/protocol.go
@@ -1,8 +1,8 @@
package roadrunner
import (
- "encoding/json"
"fmt"
+ json "github.com/json-iterator/go"
"github.com/spiral/goridge"
"os"
)
@@ -20,7 +20,8 @@ func sendControl(rl goridge.Relay, v interface{}) error {
return rl.Send(data, goridge.PayloadControl|goridge.PayloadRaw)
}
- data, err := json.Marshal(v)
+ j := json.ConfigCompatibleWithStandardLibrary
+ data, err := j.Marshal(v)
if err != nil {
return fmt.Errorf("invalid payload: %s", err)
}