Golang RPC library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
295 B

package rpc
import (
type jsonCodec struct{}
func (jsonCodec) ID() string {
return CodecJSON
func (jsonCodec) Marshal(v interface{}) ([]byte, error) {
return json.Marshal(v)
func (jsonCodec) Unmarshal(b []byte, v interface{}) error {
return json.Unmarshal(b, v)