mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-04 12:03:41 +02:00
Adding api/message/json/codec.go
This commit is contained in:
parent
0d1b0f4310
commit
3e8712c0c0
1 changed files with 14 additions and 0 deletions
14
api/message/json/codec.go
Normal file
14
api/message/json/codec.go
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
package json
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/eosswedenorg/thalos/api/message"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
message.RegisterCodec("json", message.Codec{
|
||||||
|
Encoder: json.Marshal,
|
||||||
|
Decoder: json.Unmarshal,
|
||||||
|
})
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue