示例#1
0
文件: model.go 项目: henrylee2cn/gjoa
// WriteJSON writes HMM model to an io.Writer.
func (m *Model) WriteJSON(w io.Writer) error {
	err := ju.WriteJSON(w, m)
	if err != nil {
		return err
	}
	return nil
}
示例#2
0
文件: hmm.go 项目: henrylee2cn/gjoa
// ToJSON returns a json string.
func (ms *Set) ToJSON() (string, error) {
	var b bytes.Buffer
	err := ju.WriteJSON(&b, ms)
	return b.String(), err
}
示例#3
0
文件: model.go 项目: henrylee2cn/gjoa
// ToJSON returns a json string.
func (m *Model) ToJSON() (string, error) {
	var b bytes.Buffer
	err := ju.WriteJSON(&b, m)
	return b.String(), err
}
示例#4
0
文件: align.go 项目: henrylee2cn/gjoa
// ToJSON returns a json string.
func (a Alignment) ToJSON() (string, error) {
	var b bytes.Buffer
	err := ju.WriteJSON(&b, a)
	return b.String(), err
}