good morning!!!!

Skip to content
Snippets Groups Projects
Commit 74df5b75 authored by a's avatar a
Browse files

ok

parent 4abefa82
No related branches found
No related tags found
No related merge requests found
...@@ -28,22 +28,10 @@ import ( ...@@ -28,22 +28,10 @@ import (
"sync" "sync"
"time" "time"
jsoniter "github.com/json-iterator/go" "gfx.cafe/open/jrpc/wsjson"
) )
var jzon = jsoniter.Config{ var jzon = wsjson.JZON
IndentionStep: 0,
MarshalFloatWith6Digits: false,
EscapeHTML: true,
SortMapKeys: false,
UseNumber: false,
DisallowUnknownFields: false,
TagKey: "",
OnlyTaggedField: false,
ValidateJsonRawMessage: false,
ObjectFieldMustBeSimpleString: false,
CaseSensitive: false,
}.Froze()
const ( const (
vsn = "2.0" vsn = "2.0"
......
...@@ -18,11 +18,13 @@ var jzon = jsoniter.Config{ ...@@ -18,11 +18,13 @@ var jzon = jsoniter.Config{
DisallowUnknownFields: false, DisallowUnknownFields: false,
TagKey: "", TagKey: "",
OnlyTaggedField: false, OnlyTaggedField: false,
ValidateJsonRawMessage: true, ValidateJsonRawMessage: false,
ObjectFieldMustBeSimpleString: false, ObjectFieldMustBeSimpleString: false,
CaseSensitive: false, CaseSensitive: false,
}.Froze() }.Froze()
var JZON = jzon
// Read reads a JSON message from c into v. // Read reads a JSON message from c into v.
// It will reuse buffers in between calls to avoid allocations. // It will reuse buffers in between calls to avoid allocations.
func Read(ctx context.Context, c *websocket.Conn, v interface{}) error { func Read(ctx context.Context, c *websocket.Conn, v interface{}) error {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment