package types

import "encoding/json"

func (me *CompApiReq) ToBytes() ([]byte, error) {
	return json.Marshal(me)
}

func (me *CompOpenApiResp) ToBytes() ([]byte, error) {
	return json.Marshal(me)
}

func (me *CompOpenApiResp) ToString() (string, error) {
	bs, err := me.ToBytes()
	if err != nil {
		return "", err
	}
	return string(bs), nil
}
