func WriteString(t Translator, v C) (string, error) {
	var output bytes.Buffer
	err := t.WriteTo(&output, v)
	return output.String(), err
}
WriteString uses the given Translator to turn a C into a string
package convey
import (
	"bytes"
	"encoding/base64"
	"io"
	"reflect"
	"strings"
	"github.com/ugorji/go/codec"
	"github.com/xmidt-org/wrp-go/v3/wrpmeta"
)
var (
	conveyHandle codec.Handle = &codec.JsonHandle{
		BasicHandle: codec.BasicHandle{
			DecodeOptions: codec.DecodeOptions{
				MapType: reflect.TypeOf((C)(nil)),
			},
		},
		PreferFloat:     false,
		IntegerAsString: 'L',
	}
)
type Interface interface {
	wrpmeta.Source
	Get(key string) (interface{}, bool)
}
type C map[string]interface{}
func (c C) GetString(key string) (string, bool) {
	return wrpmeta.SourceMap(c).GetString(key)
}
func (c C) Get(key string) (interface{}, bool) {
	if len(c) == 0 {
		return nil, false
	}
	v, ok := c[key]
	return v, ok
}
type Translator interface {
	ReadFrom(io.Reader) (C, error)
	WriteTo(io.Writer, C) error
}
type translator struct {
	encoding *base64.Encoding
}
func NewTranslator(encoding *base64.Encoding) Translator {
	if encoding == nil {
		encoding = base64.StdEncoding
	}
	return &translator{
		encoding: encoding,
	}
}
func (t *translator) ReadFrom(source io.Reader) (C, error) {
	decoder := codec.NewDecoder(
		base64.NewDecoder(t.encoding, source),
		conveyHandle,
	)
	var convey C
	if err := decoder.Decode(&convey); err != nil {
		return nil, Error{err, Invalid}
	}
	return convey, nil
}
func (t *translator) WriteTo(destination io.Writer, source C) error {
	encoder := base64.NewEncoder(t.encoding, destination)
	err := codec.NewEncoder(
		encoder,
		conveyHandle,
	).Encode(source)
	encoder.Close()
	if err != nil {
		return Error{err, Invalid}
	}
	return nil
}
func ReadString(t Translator, v string) (C, error) {
	return t.ReadFrom(
		strings.NewReader(v),
	)
}
func ReadBytes(t Translator, v []byte) (C, error) {
	return t.ReadFrom(
		bytes.NewReader(v),
	)
}