Files
crockery/vendor/github.com/asdine/storm/codec/json/json.go
Nick Thomas 3ad8c6f59f First split into crockery init and crockery run
The init command creates a crockery.db file containing the domain name and
TLS keypair. The run command starts IMAP and SMTP services based on that file.

Supporting only a single domain is starting to look a bit unnecessary. We'll
see how that goes.
2018-03-05 22:29:31 +00:00

26 lines
469 B
Go

// Package json contains a codec to encode and decode entities in JSON format
package json
import (
"encoding/json"
)
const name = "json"
// Codec that encodes to and decodes from JSON.
var Codec = new(jsonCodec)
type jsonCodec int
func (j jsonCodec) Marshal(v interface{}) ([]byte, error) {
return json.Marshal(v)
}
func (j jsonCodec) Unmarshal(b []byte, v interface{}) error {
return json.Unmarshal(b, v)
}
func (j jsonCodec) Name() string {
return name
}