Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
_ "google.golang.org/grpc/encoding/proto"
)

// jsonCodec replaces the default "proto" codec with JSON marshaling.
// jsonCodec provides JSON marshaling for ioswarm internal use.
// Use a distinct name "ioswarm-json" to avoid overriding the default "proto" codec.
// Must match the coordinator's codec for interoperability.
type jsonCodec struct{}

Expand All @@ -24,5 +25,5 @@ func (jsonCodec) Unmarshal(data []byte, v interface{}) error {
}

func (jsonCodec) Name() string {
return "proto"
return "ioswarm-json"
}
Loading