func (s *Side) UnmarshalJSON(data []byte) error {
	switch string(data) {
	case `"buy"`:
		*s = Buy
	case `"sell"`:
		*s = Sell
	default:
		return &json.UnsupportedValueError{
			Value: reflect.New(reflect.TypeOf(data)),
			Str:   string(data),
		}
	}
	return nil
}
UnmarshalJSON implements json.Unmarshaler interface
package orderbook
import (
	"encoding/json"
	"reflect"
)
type Side int
const (
	Sell Side = iota
	Buy
)
func (s Side) String() string {
	if s == Buy {
		return "buy"
	}
	return "sell"
}
func (s Side) MarshalJSON() ([]byte, error) {
	return []byte(`"` + s.String() + `"`), nil
}