Пример #1
0
// 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
// 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
// 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
// ToJSON returns a json string.
func (a Alignment) ToJSON() (string, error) {
	var b bytes.Buffer
	err := ju.WriteJSON(&b, a)
	return b.String(), err
}