Lines Matching full:json
18 "encoding/json"
29 // CodeParseError is used when invalid JSON was received by the server.
31 //CodeInvalidRequest is used when the JSON sent is not a valid Request object.
50 VersionTag VersionTag `json:"jsonrpc"`
52 Method string `json:"method"`
54 Params *json.RawMessage `json:"params,omitempty"`
58 ID *ID `json:"id,omitempty"`
67 VersionTag VersionTag `json:"jsonrpc"`
69 Result *json.RawMessage `json:"result,omitempty"`
71 Error *Error `json:"error,omitempty"`
73 ID *ID `json:"id,omitempty"`
79 Code int64 `json:"code"`
81 Message string `json:"message"`
83 Data *json.RawMessage `json:"data"`
108 return json.Marshal("2.0")
113 if err := json.Unmarshal(data, &version); err != nil {
137 return json.Marshal(id.Name)
139 return json.Marshal(id.Number)
144 if err := json.Unmarshal(data, &id.Number); err == nil {
147 return json.Unmarshal(data, &id.Name)